download_zenodo is giving an error
sruzzante opened this issue · 7 comments
Hi,
I'm trying to down a large number of zenodo files and this package would be super useful! Unfortunately the download_zenodo function doesn't seem to be working.
> download_zenodo("10.5281/zenodo.2547036")
Error in result$doi : $ operator is invalid for atomic vectors
The same error occurs whether I install from CRAN or github.
@sruzzante can you please give your full R session info, + packages version (including zen4R - did you get the latest from github? or the one from CRAN?)
I'm asking version of zen4R because i've been working on a fix for this in #98 . I'd like to make sure you use the latest version from Github.
Thanks @eblondel. My session info is here:
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.utf8 LC_CTYPE=English_Canada.utf8 LC_MONETARY=English_Canada.utf8 LC_NUMERIC=C
[5] LC_TIME=English_Canada.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] zen4R_0.7.1
loaded via a namespace (and not attached):
[1] httr_1.4.4 compiler_4.2.1 keyring_1.3.1 assertthat_0.2.1 R6_2.5.1 tools_4.2.1 curl_4.3.2 Rcpp_1.0.9
[9] xml2_1.3.3 codetools_0.2-18 jsonlite_1.8.4 terra_1.6-47
I tried running this on another computer, with R4.1.2 installed, and it worked. Here's that session info:
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
Matrix products: default
locale:
[1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252 LC_NUMERIC=C LC_TIME=English_Canada.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] zen4R_0.7.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.9 compiler_4.1.2 later_1.3.0 urlchecker_1.0.1 prettyunits_1.1.1 profvis_0.3.7 remotes_2.4.2 tools_4.1.2
[9] digest_0.6.29 pkgbuild_1.3.1 pkgload_1.3.2 jsonlite_1.8.4 lattice_0.20-45 memoise_2.0.1 lifecycle_1.0.3 rlang_1.0.6
[17] shiny_1.7.2 cli_3.4.1 rstudioapi_0.14 fastmap_1.1.0 terra_1.6-47 xml2_1.3.3 httr_1.4.4 raster_3.6-11
[25] stringr_1.5.0 fs_1.5.2 htmlwidgets_1.5.4 devtools_2.4.4 grid_4.1.2 glue_1.6.2 R6_2.5.1 processx_3.7.0
[33] sessioninfo_1.2.2 sp_1.5-1 callr_3.7.2 purrr_0.3.5 magrittr_2.0.3 codetools_0.2-18 ps_1.7.1 promises_1.2.0.1
[41] ellipsis_0.3.2 htmltools_0.5.3 usethis_2.1.6 assertthat_0.2.1 mime_0.12 xtable_1.8-4 httpuv_1.6.6 keyring_1.3.1
[49] stringi_1.7.8 miniUI_0.1.1.1 cachem_1.0.6 crayon_1.5.2
Thanks @sruzzante could you reinstall zen4R from github and re-do your tests (on both machines). If you use Rstudio please always restart R session, because Rstudio keeps in cache the previous installation
Unfortunately still no luck with 4.2.1. I've tried reinstalling zen4R, restarting the R session, restarting the computer, manually removing and reinstalling curl, deleting etc... Always the same error.
It still works on my other computer, so I can't rule out that this a bug somewhere in my installation of R.