pygbif
pygbif copied to clipboard
[DOCUMENTATION] GBIF_USER and GBIF_PWD missing but needed
When I try to download occurrences to a taxon family I am getting the following errors...
occ.download('taxonKey = 6920') ValueError: GBIF_USER not supplied and no entry in environmental variables
occ.download(user = "USER", 'taxonKey = 6920') ValueError: GBIF_PWD not supplied and no entry in environmental
... but if both your gbif.org user and pwd are supplied it only works:
occ.download(user = "USER", pwd = "[PASSWORD], 'taxonKey = 6920')
I could not find this directly in the documentation https://pygbif.readthedocs.io/en/latest/docs/usecases.html
The use of environment variables to specify GBIF_USER, GBIF_PWD and GBIF_EMAIL is specified in the API documentation for the download method: https://pygbif.readthedocs.io/en/latest/modules/occurrence.html#pygbif.occurrences.download I suppose it is not currently included in the use case as this does not extend to use of the download functionality. I agree, the use case could be expanded to cover setup of environment variables and download as an extra step.
Or both methods as they both work.