Skip to content

Exporting bib file can successfully be useful and insert citation is ok, but once clicking "Connect and load libraries", it crashed. #93

@qq1307229333

Description

@qq1307229333

I think I conducted the correct procedures according to methods.
Firstly, I exported .bib file named "references.bib" at my folder D:/tests/.
Then, In Rstudio, I clicked Addins -> insert citations one by one.

image

And here displayed ok, I think.
image

Here displayed good in Rstudio and word, too.
image

However, I started to click Connect and load libraries because I want to use the function of syncing Zotero items (I even don't want to exported .bib file, firstly). As you can see the words:"If you are using Zotero citr can access your reference database directly."
image

But the result is error and throw up the messages.
image

> citr:::insert_citation()

Listening on http://127.0.0.1:6934
Warning: The select input "selected_key" contains a large number of options; consider using server-side selectize for massively improved performance. See the Details section of the ?selectizeInput help topic.
Warning: Error in data.frame: arguments imply differing number of rows: 0, 1
  73: stop
  72: data.frame
  71: bibtex::do_read_bib
  70: RefManageR::ReadBib
  69: import_bbt
  68: load_betterbiblatex_bib
  64: <reactive>
  48: bibliography
  47: observe
  46: <observer>
   3: shiny::runApp
   2: runGadget
   1: citr:::insert_citation
Warning: Error in data.frame: arguments imply differing number of rows: 0, 1

It's so weird. Hope you can help me solve it, thank you.

Here is my info:

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 
[2] LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936    

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

other attached packages:
[1] shiny_1.7.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3      plyr_1.8.7        citr_0.3.2       
 [4] compiler_4.0.3    bslib_0.4.2       later_1.3.0      
 [7] jquerylib_0.1.4   shinyjs_2.1.0     tools_4.0.3      
[10] digest_0.6.29     timechange_0.1.1  jsonlite_1.8.0   
[13] lubridate_1.9.0   evaluate_0.14     memoise_2.0.1    
[16] lifecycle_1.0.3   rlang_1.0.6       bibtex_0.5.0     
[19] cli_3.5.0         rstudioapi_0.14   curl_4.3.2       
[22] yaml_2.3.5        xfun_0.30         fastmap_1.1.0    
[25] xml2_1.3.3        stringr_1.5.0     RefManageR_1.4.0 
[28] httr_1.4.4        knitr_1.36        generics_0.1.3   
[31] sass_0.4.1        glue_1.6.2        fontawesome_0.4.0
[34] R6_2.5.1          rmarkdown_2.11    magrittr_2.0.1   
[37] backports_1.4.1   promises_1.2.0.1  ellipsis_0.3.2   
[40] htmltools_0.5.4   assertthat_0.2.1  mime_0.12        
[43] xtable_1.8-4      httpuv_1.6.5      stringi_1.7.6    
[46] miniUI_0.1.1.1    cachem_1.0.6      crayon_1.5.2

What I had done are:

  1. update Rstudio and packages related to citr.
  2. Better BibTex installed.
  3. YAML code:
---
title: "test"
author: "YunFei"
date: "2022-12-29"
bibliography: ["references.bib"]
output: word_document
---

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions