pygbif icon indicating copy to clipboard operation
pygbif copied to clipboard

[DOCUMENTATION] GBIF_USER and GBIF_PWD missing but needed

Open bwakkie opened this issue 3 years ago • 2 comments

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

bwakkie avatar Dec 23 '21 10:12 bwakkie

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.

nickynicolson avatar Jan 04 '22 16:01 nickynicolson

Or both methods as they both work.

bwakkie avatar Jan 11 '22 10:01 bwakkie