eblondel/zen4R

Align files listing / download on new method to fetch records

showteeth opened this issue · 4 comments

Hi,
I got an error when running the example:

library(zen4R)
zenodo <- ZenodoManager$new(logger = "INFO")
rec <- zenodo$getRecordByDOI("10.5281/zenodo.3378733")
# error on this step
files <- rec$listFiles(pretty = TRUE)

The error message:

Error in data.frame(id = x$id, checksum = x$checksum, filename = x$filename,  : 
  arguments imply differing number of rows: 0, 1

And, when I tried to download the data:

#create a folder where to download my files
dir.create("download_zenodo")
#download files
rec$downloadFiles(path = "download_zenodo")

Another error:

Error in sum(sapply(files.list, function(x) { : 
  invalid 'type' (list) of argument

The session info:

R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 13.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] zen4R_0.9

loaded via a namespace (and not attached):
  [1] nlme_3.1-149            matrixStats_0.63.0      spatstat.sparse_3.0-1   RcppAnnoy_0.0.20        RColorBrewer_1.1-3     
  [6] httr_1.4.5              sctransform_0.3.5       tools_4.0.3             utf8_1.2.3              R6_2.5.1               
 [11] irlba_2.3.5.1           rpart_4.1-15            KernSmooth_2.23-17      uwot_0.1.14             mgcv_1.8-33            
 [16] lazyeval_0.2.2          colorspace_2.1-0        sp_1.6-0                tidyselect_1.2.0        gridExtra_2.3          
 [21] curl_5.0.0              compiler_4.0.3          progressr_0.13.0        cli_3.6.1               xml2_1.3.3             
 [26] plotly_4.10.1           Seurat_4.0.1            scales_1.2.1            lmtest_0.9-40           spatstat.data_3.0-1    
 [31] ggridges_0.5.4          pbapply_1.7-0           goftest_1.2-3           stringr_1.5.0           digest_0.6.31          
 [36] spatstat.utils_3.0-2    pkgconfig_2.0.3         htmltools_0.5.5         parallelly_1.35.0       fastmap_1.1.1          
 [41] htmlwidgets_1.6.2       rlang_1.1.0             keyring_1.3.1           rstudioapi_0.14         rPanglaoDB_0.2.1       
 [46] shiny_1.7.4             generics_0.1.3          zoo_1.8-12              jsonlite_1.8.4          spatstat.random_3.1-4  
 [51] ica_1.0-3               dplyr_1.1.2             magrittr_2.0.3          patchwork_1.1.2         Matrix_1.5-4           
 [56] Rcpp_1.0.10             munsell_0.5.0           fansi_1.0.4             abind_1.4-5             reticulate_1.28        
 [61] lifecycle_1.0.3         stringi_1.7.12          MASS_7.3-58             Rtsne_0.16              plyr_1.8.8             
 [66] grid_4.0.3              parallel_4.0.3          listenv_0.9.0           promises_1.2.0.1        ggrepel_0.9.3          
 [71] deldir_1.0-6            miniUI_0.1.1.1          lattice_0.20-41         cowplot_1.1.1           splines_4.0.3          
 [76] tensor_1.5              pillar_1.9.0            igraph_1.4.2            spatstat.geom_3.1-0     future.apply_1.10.0    
 [81] reshape2_1.4.4          codetools_0.2-16        leiden_0.4.3            XML_3.99-0.14           glue_1.6.2             
 [86] SeuratObject_4.1.3      data.table_1.14.8       png_0.1-8               vctrs_0.6.2             httpuv_1.6.9           
 [91] polyclip_1.10-4         gtable_0.3.3            RANN_2.6.1              purrr_1.0.1             spatstat.core_2.4-4.010
 [96] tidyr_1.3.0             assertthat_0.2.1        scattermore_0.8         future_1.32.0           ggplot2_3.4.2          
[101] mime_0.12               xtable_1.8-4            later_1.3.0             survival_3.2-7          viridisLite_0.4.1      
[106] tibble_3.2.1            cluster_2.1.0           globals_0.16.2          fitdistrplus_1.1-11     ellipsis_0.3.2         
[111] ROCR_1.0-11 

Thanks @showteeth for reporting i'm investigating it. It's a regression caused by some enhancement I did recently #123.

@showteeth i've pushed a tentative fix. Can you please test and let me know if it runs now on your side?

@eblondel Thanks for your timely update! I have tested it and it works very well.

Great to hear @showteeth