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

Error in downloading global wdpa data #15

Closed JocelyneSze closed 4 years ago

JocelyneSze commented 4 years ago

Hi, I'm not sure if this error should be reported here or to the folks at WDPA(?), but when I've tried downloading the global data using wdpa_fetch('global'), I get the following error: Error in utils::unzip(x, exdir = tdir) : cannot open file '/var/folders/j0/s0q31lh965q7dmf_cpt7bg040000gn/T//RtmpeGEG0F/file2f86347d96e/WDPA_Sep2019_Public/Recursos_en_Espanol/Ap�ndice 5_Metadatos.pdf': Illegal byte sequence I can download the global file from the protectedplanet website, so accessing the file isn't a big problem, I just wanted to flag this error. Thanks, Jocelyne

florafinder commented 4 years ago

I am having the exact same issue/error message, hopefully there is a workaround!

jeffreyhanson commented 4 years ago

Thanks for reporting this issue @JocelyneSze and @florafinder. Also, @JocelyneSze, I'm sorry I didn't respond to you earlier. I thought I did but it clearly slipped my mind.

I don't really know what could be causing this. I haven't encountered this on my computer. I suppose the issue could be due to one (or more) of the following reasons/guesses: (1) there is something wrong with the file on the protected planet website, (2) there is something wrong happening with the download process (e.g. the download didn't complete), or (3) there is something wrong happening with the unzipping process.

To help me narrow down the issue, could you please try downloading the file manually to your computer from the protected planet website and see if it matches the file that wdpar downloaded? Also, could you please try unzipping both of these files through R using the unzip function to see if it works?

JocelyneSze commented 4 years ago

Hi, sorry I left the issue hanging but the problem seems to have resolved anyway, I've just used wdpa_fetch with no further problems.

jeffreyhanson commented 4 years ago

Ok - great! Thank you very much for letting me know that it's working now.