wdpar
wdpar copied to clipboard
Error with wdpa_fetch()
It seems there have been changes to the Protected Planet website that have broken the wdpa_fetch()
function. So, I need to update this function so that it works again. Here's a rerex:
library(wdpar)
x <- wdpa_fetch("LIE")
#> Error in session_makeRequest(self, private, endpoint, data, params, headers) :
#> Unable to find element with css selector '.download__trigger'
Actually, it seems that the functions for navigating the Protected Planet website using the webdriver package no longer work on my computer.
Fixed by #78
Hi, I get the same error message when I try to use wdpa_fetch. How can I fix this?
Hi @duboisl-afd, could you please try installing the latest developmental version of the package from GitHub and see if that fixes it? I think I fixed this in a an earlier patch, but I haven't submitted an update to CRAN yet (so the CRAN version isn't currently working). To install the GitHub version of the package, see https://github.com/prioritizr/wdpar?tab=readme-ov-file#package-installation
Hi, I tried with the same result... but i am also using R studio in docker so maybe my error is related to this.
Thanks for trying that. Maybe you're on a slow internet connection? I've made a branch with an extra step to wait for the page to load when wdpar is looking for the WDPA download links. Can you please try installing it and trying it again? To install it, please use remotes::install_github("prioritizr/wdpar@extra-wait")
Thanks for your help. I tried as well but i'm still getting the same error message.
Ah, sorry about that. Could you please share your session info after loading the package? E.g., whats the output from this:
library(wdpar)
sessionInfo()