cboettig / knitcitations

:package: Generate citations for knitr markdown and html files
http://carlboettiger.info
Other
219 stars 28 forks source link

Error: citep cannot find citation on a server #87

Open wolass opened 8 years ago

wolass commented 8 years ago
> citep("10.1684/ejd.2008.0573")
server error for doi “http://dx.doi.org/10.1684/ejd.2008.0573”, you may want to try again. 
no results with relavency score greater than ‘min.relevance’ successfully retrieved
Error in (function (bibtype, textVersion = NULL, header = NULL, footer = NULL,  : 
      argument "bibtype" is missing, with no default

but when I use the link http://dx.doi.org/10.1684/ejd.2008.0573 the site opens,

when I paste the doi into doi2bib:

@article{Celine AuxenfansJulie FradetteCharlotte LequeuxLucie GermainBeste KinikogluNicolas BechetoilleFabienne BrayeFrançois A AugerOdile Damour2009,
  title = {Evolution of three dimensional skin equivalent models reconstructed in vitro by tissue engineering},
  volume = {19},
  url = {http://doi.org/10.1684/ejd.2008.0573},
  DOI = {10.1684/ejd.2008.0573},
  number = {2},
  journal = {European Journal of Dermatology},
  publisher = {John Libbey Eurotext},
  author = {Celine Auxenfans and Julie Fradette and Charlotte Lequeux and Lucie Germain and Beste Kinikoglu and Nicolas Bechetoille and Fabienne Braye and Fran\c{c}ois A Auger and Odile Damour},
  year = {2009},
  month = {Mar},
  pages = {107–113}
}
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=pl_PL.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=pl_PL.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=pl_PL.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=pl_PL.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] knitcitations_1.0.7

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.2       lubridate_1.3.3   XML_3.98-1.3      digest_0.6.8      bitops_1.0-6      plyr_1.8.3       
 [7] R6_2.1.1          magrittr_1.5      bibtex_0.4.0      httr_1.0.0        stringi_1.0-1     RJSONIO_1.3-0    
[13] tools_3.2.2       stringr_1.0.0     RefManageR_0.8.63 RCurl_1.95-4.7    memoise_0.2.1    

Other DOIs work well. This happens for selected DOIs only.

cboettig commented 8 years ago

Thanks for the bug report with the example; that's pretty strange. Will look into it.

cboettig commented 8 years ago

Appears to be an upstream bug in RefManageR, so hoping it will get addressed there: https://github.com/mwmclean/RefManageR/issues/7

I suppose we could swap in rcrossref to get a bit more robust handling for this, but it would be cleaner and simpler to address upstream.

mwmclean commented 8 years ago

Though there is an (easily fixed) bug with RefManageR here, note that the key for this entry is not valid. With the bux fixed, this entry will still not be parsed (by either the R package bibtex, which RefManageR depends on or actual BibTeX) because of the white space in the key. Using a different RefManageR function that does not have the bug produces:

RefManageR::GetBibEntryWithDOI("10.1684/ejd.2008.0573")
## Warning message:
## In do_read_bib(file, encoding = .Encoding, srcfile) : 
## /tmp/RtmpIpffl1/filecd2659e6c68.bib:1:0
##  syntax error, unexpected TOKEN_ABBREV, expecting TOKEN_COMMA
##  Dropping the entry `Celine` (starting at line 1) 
cboettig commented 8 years ago

@mwmclean thanks and apologies, I also hadn't noticed that this example also had what looks like an invalid key; notably crossref cn fails to even return an entry in its own crossref-xml or citeproc-json format for this DOI.