Skip to content

Option "verbatim" in method species.name_usage throws error for specific taxon #109

Open
@GrazingScientist

Description

@GrazingScientist

Python Version: 3.8
pygbif Version: 0.6.2

When using the verbatim option in the species.name_usage method, I get an error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/venv/lib/python3.8/site-packages/pygbif/species/name_usage.py", line 108, in name_usage
    return name_usage_fetch(data, key, shortname, uuid, args, **kwargs)
  File "/venv/lib/python3.8/site-packages/pygbif/species/name_usage.py", line 143, in name_usage_fetch
    res = gbif_GET(url, args, **kwargs)
  File "/venv/lib/python3.8/site-packages/pygbif/gbifutils.py", line 34, in gbif_GET
    out.raise_for_status()
  File "/venv/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.gbif.org/v1/species/5231190/verbatim?limit=100

Code to reproduce the error:

from pygbif import species
species.name_usage(key="5231190", data="verbatim")

However, when using the key for another taxon, it works:

from pygbif import species
species.name_usage(key="101683527", data="verbatim")

So, this issue seems to be on the API side. Still, this behavior is not documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions