prioritizr / wdpar

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

Error: Summary: NoSuchElement #11

Closed urskalbitzer closed 5 years ago

urskalbitzer commented 5 years ago

Hi, The package looks very interesting and tried to use it today for the first time. Unfortunately, I ran into a problem when I tried to fetch data.

After getting the error message (see below), I installed the most recent version of wdpar from github, and also updated all other packages, but I still get the same erro.

I'm running RStudio on MacOS 10.14.4.

It would be great if I could use the package on my computer.

Thanks a lot, Urs

# load packages

library(wdpar)
library(dplyr)

# download protected area data for Malta
mlt_raw_pa_data <- wdpa_fetch("Malta", wait = TRUE)
#> Error:    Summary: NoSuchElement
#>       Detail: An element could not be located on the page using the given search parameters.
#>       class: org.openqa.selenium.NoSuchElementException
#>   Further Details: run errorDetails method

Created on 2019-04-08 by the reprex package (v0.2.1)

jeffreyhanson commented 5 years ago

Thank you very much for reporting this - it looks like protected planet has updated their website and so this package needs to be updated as well to download the protected area data. I'll see if I can sort this out over the next few days. In the meantime though, you can manually download the protected area data of your choice and import it into R using sf::read_sf and then use wdpar::wdpa_clean to clean the data.

urskalbitzer commented 5 years ago

Thanks a lot for the quick response. I will download the data from the web page and import it with sf::st_read.

jeffreyhanson commented 5 years ago

@urskalbitzer, I've just pushed a new version to GitHub that fixes the problem on my computer. Could you please try installing this developmental version (see README for instructions), and try rerunning the example on your computer?

urskalbitzer commented 5 years ago

@jeffreyhanson, thanks for this very quick fix. I've just tried it with the new version from GitHub and it works perfectly.

jeffreyhanson commented 5 years ago

Awesome - thank you very much! I'll bump the version and send it to CRAN.