prioritizr / wdpar

Interface to the World Database on Protected Areas
https://prioritizr.github.io/wdpar
GNU General Public License v3.0
37 stars 5 forks source link

HTTP error 404 in "global" query with wdpa_fetch #34

Closed jmemb closed 3 years ago

jmemb commented 3 years ago

Hi @jeffreyhanson! Thanks a lot for the useful package and for taking the time to address all of the open issues. I have gone through all of them and I haven't found the error I am getting, so here I go: When trying to retrieve the whole dataset through: _global_data <- wdpafetch("global",wait = FALSE) I get the following error: Downloaded 303 bytes...Error in curl::curl_download(download_url, file_path, quiet = !verbose) : HTTP error 404. I have tried id from different R versions and servers and I always get the same error. Any clue what might be causing this?

Thanks in advance!

jeffreyhanson commented 3 years ago

Hi @jmemb - thank you very much for raising this issue! I was able to reproduce this error using the CRAN version of wdpar, but it seems to work using the developmental version on GitHub. Could you please try installing the GitHub version and see if it works? To install the GitHub version, please the following R code:

if (!require(devtools))
  install.packages("devtools")
devtools::install_github("prioritizr/wdpar")
jmemb commented 3 years ago

It worked! Thank you very much @jeffreyhanson!

jeffreyhanson commented 3 years ago

Awesome - thanks for letting me know. I'll try and release the GitHub version onto CRAN sometime in the next week so that other people don't encounter this error.