ropensci / rdryad

R client for Dryad web services
https://docs.ropensci.org/rdryad
Other
25 stars 7 forks source link

Unable to download files from dryad #33

Closed janxkoci closed 3 years ago

janxkoci commented 3 years ago

Hi, I'm trying to download individual files from a published dataset.

From the linked dryad website, I copied file ids for files of interest, however I encountered problems while trying to download them.

One file failed completely:

> dryad_files_download(33893)
Error in file(file): invalid 'description' argument
Traceback:

1. dryad_files_download(33893)
2. Map(function(x, y) each_files_download(x, y, ...), ids, paths)
3. mapply(FUN = f, ..., SIMPLIFY = FALSE)
4. (function (x, y) 
 . each_files_download(x, y, ...))(dots[[1L]][[1L]], dots[[2L]][[1L]])
5. each_files_download(x, y, ...)
6. file(file)

Another file successfully downloaded, but it's content is missing:

> dryad_files_download(33892)
[[1]]
[1] "/home/jena/.cache/R/rdryad/33892.docx"
$ ls -l /home/jena/.cache/R/rdryad/33892.docx
-rw-r--r-- 1 jena jena 6 pro 14 12:32 /home/jena/.cache/R/rdryad/33892.docx
$ head /home/jena/.cache/R/rdryad/33892.docx
PK

Here is a screenshot showing some extra characters after the "PK": Snímek z 2020-12-14 12-48-34

Session Info ```r R version 3.6.1 (2019-07-05) Platform: x86_64-conda_cos6-linux-gnu (64-bit) Running under: elementary OS 5.1.7 Hera Matrix products: default BLAS/LAPACK: /home/jena/miniconda3/lib/libopenblasp-r0.3.12.so locale: [1] LC_CTYPE=cs_CZ.UTF-8 LC_NUMERIC=C [3] LC_TIME=cs_CZ.UTF-8 LC_COLLATE=cs_CZ.UTF-8 [5] LC_MONETARY=cs_CZ.UTF-8 LC_MESSAGES=cs_CZ.UTF-8 [7] LC_PAPER=cs_CZ.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=cs_CZ.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] rdryad_1.0.0 loaded via a namespace (and not attached): [1] Rcpp_1.0.5 magrittr_2.0.1 rappdirs_0.3.1 uuid_0.1-4 [5] R6_2.5.0 rlang_0.4.8 hoardr_0.5.2 tools_3.6.1 [9] htmltools_0.5.0 ellipsis_0.3.1 digest_0.6.27 httpcode_0.3.0 [13] tibble_3.0.4 lifecycle_0.2.0 crayon_1.3.4 zip_2.1.1 [17] IRdisplay_0.7.0 repr_1.1.0 base64enc_0.1-3 vctrs_0.3.5 [21] triebeard_0.3.0 IRkernel_1.1.1 curl_4.3 crul_1.0.0 [25] evaluate_0.14 mime_0.9 pbdZMQ_0.3-3.1 compiler_3.6.1 [29] pillar_1.4.7 urltools_1.7.3 jsonlite_1.7.1 pkgconfig_2.0.3 ```
sckott commented 3 years ago

Thanks for much for the issue. I'll have a look

sckott commented 3 years ago

reinstall, should work now

janxkoci commented 3 years ago

Thanks a lot! Should I just update from CRAN or from github instead?

sckott commented 3 years ago

Here for now. Probably a new version on CRAN in january