Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sp_occurrence() fails when end>100000 #63

Open
AMBarbosa opened this issue Jan 26, 2024 · 0 comments
Open

sp_occurrence() fails when end>100000 #63

AMBarbosa opened this issue Jan 26, 2024 · 0 comments

Comments

@AMBarbosa
Copy link

AMBarbosa commented Jan 26, 2024

If end >100,000, an error message is shown, even if start is large enough for the total number of records to be OK:

sp_occurrence(genus = "Lutra", download = FALSE) 
[1] 243745

sp_occurrence(genus = "Lutra", start=100000, end=100001)
# Error in sp_occurrence(genus = "Lutra", start = 1e+05, end = 100001) : 
  GBIF does not allow using this service for record numbers that are > 100,000

I submitted a pull request (#62) that seems to fix that. After applying that fix, the download does start, but then seems to fail under most circumstances, though not all - ignore the wacky reported number of downloaded records, which is the subject of a separate issue (#64):

sp_occurrence(genus = "Lutra", start = 99999, end=100001)  # OK:
# 3 records found
# 99998-100001
# 100001 records downloaded
#                acceptedNameUsageID       acceptedScientificName [...]
# 1 urn:lsid:dyntaxa.se:Taxon:100077 Lutra lutra (Linnaeus, 1758) [...]
# 2 urn:lsid:dyntaxa.se:Taxon:100077 Lutra lutra (Linnaeus, 1758) [...]
# 3 urn:lsid:dyntaxa.se:Taxon:100077 Lutra lutra (Linnaeus, 1758) [...]

sp_occurrence(genus = "Lutra", start = 99999, end=100002) 
# 4 records found
# 99998-download failed
# NULL
@AMBarbosa AMBarbosa changed the title sp_occurrence() fails with end>100000 sp_occurrence() fails when end>100000 Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant