ropensci-archive / fulltext

:warning: ARCHIVED :warning: Search across and get full text for OA & closed journals
Other
271 stars 46 forks source link

Error in sprintf(pat, x) : too few arguments #216

Closed achamess closed 4 years ago

achamess commented 4 years ago

I'm trying to use a list of DOIs to download full text PDFs. It's working partially, downloading several from the same publisher, but then it's getting hung up and I get the following error:

Input:
bib_ft <- ft_get(DOI_list,type = "pdf", progress = T)
Error in sprintf(pat, x) : too few arguments

Not sure what to do, or which DOI is even the problem.

Session Info ```r R version 3.5.0 (2018-04-23) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS 10.15.2 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/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] forcats_0.4.0 stringr_1.4.0 dplyr_0.8.3 purrr_0.3.2 readr_1.3.1 [6] tidyr_1.0.0 tibble_2.1.3 ggplot2_3.2.1 tidyverse_1.2.1 fulltext_1.4.0 loaded via a namespace (and not attached): [1] httr_1.4.1 jsonlite_1.6 modelr_0.1.5 pdftools_2.3 shiny_1.3.2 [6] assertthat_0.2.1 askpass_1.1 triebeard_0.3.0 urltools_1.7.3 rplos_0.8.6 [11] cellranger_1.1.0 yaml_2.2.0 sessioninfo_1.1.1 qpdf_1.1 pillar_1.4.2 [16] backports_1.1.4 lattice_0.20-38 glue_1.3.1 digest_0.6.21 promises_1.0.1 [21] microdemic_0.5.0 rvest_0.3.4 colorspace_1.4-1 htmltools_0.3.6 httpuv_1.5.2 [26] plyr_1.8.4 XML_3.98-1.20 pkgconfig_2.0.3 bibtex_0.4.2 httpcode_0.2.0 [31] broom_0.5.2 haven_2.1.1 xtable_1.8-4 scales_1.0.0 whisker_0.4 [36] later_0.8.0 aRxiv_0.5.19 solrium_1.1.4 generics_0.0.2 DT_0.9 [41] withr_2.1.2 lazyeval_0.2.2 cli_1.1.0 magrittr_1.5 crayon_1.3.4 [46] readxl_1.3.1 mime_0.7 storr_1.2.1 nlme_3.1-141 xml2_1.2.2 [51] data.table_1.12.2 tools_3.5.0 hms_0.5.1 lifecycle_0.1.0 munsell_0.5.0 [56] compiler_3.5.0 rlang_0.4.0 grid_3.5.0 rstudioapi_0.10 rappdirs_0.3.1 [61] htmlwidgets_1.3 miniUI_0.1.1.1 gtable_0.3.0 rentrez_1.2.2 curl_4.2 [66] reshape2_1.4.3 R6_2.4.0 lubridate_1.7.4 knitr_1.25 zeallot_0.1.0 [71] rcrossref_1.0.0 hoardr_0.5.2 stringi_1.4.3 crul_0.9.0 Rcpp_1.0.2 [76] vctrs_0.2.0 tidyselect_0.2.5 xfun_0.9 ```
sckott commented 4 years ago

thanks @achamess for your report. please share an example DOI that is causing that error

achamess commented 4 years ago

thanks @achamess for your report. please share an example DOI that is causing that error

Thanks for the reply. I'm not sure which one(s) are the trouble.

Here is the entire list. Not sure if anything obvious:

[1] "10.1016/j.neures.2007.12.011"      
  [2] "10.1186/1471-2164-9-268"           
  [3] "10.1126/science.1254257"           
  [4] "10.1038/nbt.2967"                  
  [5] "10.1038/nn.3881"                   
  [6] "10.15252/embj.201488977"           
  [7] "10.1038/mp.2014.162"               
  [8] "10.1126/science.aaa1934"           
  [9] "10.1073/pnas.1507125112"           
 [10] "10.1016/j.cell.2015.09.004"        
 [11] "10.1038/nbt.3443"                  
 [12] "10.1038/nn.4216"                   
 [13] "10.1038/ncomms11022"               
 [14] "10.1126/science.aaf6463"           
 [15] "10.1126/science.aaf1204"           
 [16] "10.1126/science.aad8670"           
 [17] "10.1016/j.celrep.2016.06.059"      
 [18] "10.1126/science.aad7038"           
 [19] "10.1016/j.neuron.2016.10.001"      
 [20] "10.1038/nature20123"               
 [21] "10.15252/msb.20166969"             
 [22] "10.1038/nn.4462"                   
 [23] "10.1016/j.celrep.2016.12.060"      
 [24] "10.1038/nn.4495"                   
 [25] "10.1038/ng.3806"                   
 [26] "10.1016/j.celrep.2017.03.004"      
 [27] "10.1126/science.aai8478"           
 [28] "10.1016/j.neuron.2017.03.017"      
 [29] "10.1016/j.cell.2017.05.018"        
 [30] "10.1016/j.ccell.2017.06.003"       
 [31] "10.1016/j.cell.2017.08.032"        
 [32] "10.1016/j.celrep.2017.09.039"      
 [33] "10.1016/j.neuron.2017.09.026"      
 [34] "10.1016/j.celrep.2017.10.030"      
 [35] "10.1016/j.molcel.2017.11.017"      
 [36] "10.1126/science.aap8809"           
 [37] "10.1038/s41593-017-0029-5"         
 [38] "10.1038/nbt.4038"                  
 [39] "10.1016/j.celrep.2017.11.050"      
 [40] "10.1186/s13059-017-1362-4"         
 [41] "10.1016/j.celrep.2017.12.017"      
 [42] "10.1016/j.celrep.2017.12.046"      
 [43] "10.1038/s41593-017-0056-2"         
 [44] "10.1038/nature25739"               
 [45] "10.1681/ASN.2017080890"            
 [46] "10.1126/science.aar6821"           
 [47] "10.1016/j.ajhg.2018.02.001"        
 [48] "10.1038/nature25999"               
 [49] "10.1038/nature25980"               
 [50] "10.1523/JNEUROSCI.17-10-03894.1997"
 [51] "10.1038/s41467-018-03538-9"        
 [52] "10.1016/j.cell.2018.03.063"        
 [53] "10.1126/science.aao4750"           
 [54] "10.1038/s41422-018-0053-3"         
 [55] "10.1126/science.aat5691"           
 [56] "10.1186/s13073-018-0567-9"         
 [57] "10.1101/377606"                    
 [58] "10.1016/j.cell.2018.06.021"        
 [59] "10.1016/j.cell.2018.07.028"        
 [60] "10.15252/embr.201846171"           
 [61] "10.1016/j.cub.2018.07.062"         
 [62] "10.1038/s41467-018-06222-0"        
 [63] "10.1016/j.celrep.2018.08.080"      
 [64] "10.1101/431957"                    
 [65] "10.1038/s41592-018-0175-z"         
 [66] "10.1101/449439"                    
 [67] "10.1038/s41586-018-0654-5"         
 [68] "10.1126/science.aau5324"           
 [69] "10.1016/j.immuni.2018.11.004"      
 [70] "10.1016/j.celrep.2018.11.003"      
 [71] "10.1016/j.celrep.2018.11.034"      
 [72] "10.1016/j.celrep.2018.12.044"      
 [73] "10.1038/s41467-019-08453-1"        
 [74] "10.7554/eLife.42388"               
 [75] "10.1016/j.cell.2019.01.040"        
 [76] "10.1038/s41593-019-0349-8"         
 [77] "10.1242/dev.174284"                
 [78] "10.1038/s41586-019-1049-y"         
 [79] "10.1126/science.aaw1219"           
 [80] "10.1016/j.stem.2019.03.006"        
 [81] "10.1016/j.celrep.2019.03.099"      
 [82] "10.1038/s41586-019-1158-7"         
 [83] "10.1038/s41586-019-1195-2"         
 [84] "10.1101/613596"                    
 [85] "10.1038/s41593-019-0393-4"         
 [86] "10.1126/science.aav2522"           
 [87] "10.1126/science.aav8130"           
 [88] "10.1101/657148"                    
 [89] "10.1126/science.aas9536"           
 [90] "10.1038/s41593-019-0419-y"         
 [91] "10.1016/j.celrep.2019.05.090"      
 [92] "10.1126/science.aax1184"           
 [93] "10.1038/s41586-019-1362-5"         
 [94] "10.1101/692608"                    
 [95] "10.1016/j.neuron.2019.06.011"      
 [96] "10.1038/s41586-019-1404-z"         
 [97] "10.1016/j.cell.2019.06.024"        
 [98] "10.1101/713412"                    
 [99] "10.1186/s13195-019-0524-x"         
[100] "10.1038/s41467-019-11667-y"        
[101] "10.1038/s41586-019-1506-7"         
[102] "10.1016/j.ajhg.2019.07.019"        
[103] "10.1038/s41592-019-0548-y"         
[104] "10.1101/770610"                    
[105] "10.1038/s41593-019-0491-3"         
[106] "10.1101/791525"                    
[107] "10.1016/j.cell.2019.09.020"        
[108] "10.1038/s41593-019-0539-4"         
[109] "10.1101/2019.12.19.883546"         
[110] "10.1523/ENEURO.0345-19.2019"       
[111] "10.1101/2020.02.28.969931"         
[112] "10.1101/2020.02.29.970558"         
[113] "10.1038/s41467-019-14198-8"        
[114] "10.1101/2020.03.04.976407"         
[115] "10.1038/s41467-020-15041-1"

I did try to go through some just to test. The only ones that work perfectly are the ones from science (AAAS) and eLife. The Nature and Cell Press (sciencedirect) don't work at all. Kind of a bummer. I love the idea of this package though. Just seems like a lot of barriers.

sckott commented 4 years ago

The barriers come from publishers, not this package.

It was the doi 10.1242/dev.174284 that caused the issue. Added a plugin for this publisher, should work now after you restart R, reinstall remotes::install_github("ropensci/fulltext")

achamess commented 4 years ago

Didn't mean to imply you all made the barriers. I understand they come from the publishers and they don't make it easy at all. Thank you for your hard work! In the future, is there a good way for me to identify which DOI throws the error so I can more specifically post issues?

achamess commented 4 years ago

FYI, when I downloaded the dev version of fulltext it threw this error

The downloaded binary packages are in
    /var/folders/gx/mfdx8g856wvdtp0dw7k8h2s80000gn/T//RtmpzNtTdw/downloaded_packages
internal error -3 in R_decompress1Error: Failed to install 'fulltext' from GitHub:pzNtTdw/remotes4d9441e7d4f1/ropensci-fulltext-bb00978/DESCRIPTION’ ...
  lazy-load database '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/prettyunits/R/prettyunits.rdb' is corrupt
sckott commented 4 years ago

did you restart R first?