crsh / citr

RStudio Addin to Insert Markdown Citations
Other
407 stars 46 forks source link

Only first insertion works, then `Warning: Error in file.exists: invalid 'file' argument` #45

Closed nevrome closed 5 years ago

nevrome commented 5 years ago

The first time I call citr to insert a citation in a session everything works perfectly fine. The second and all following times though it fails with the following error message:

> citr:::insert_citation()

Listening on http://127.0.0.1:4802
Warning: Error in file.exists: invalid 'file' argument
  95: file.exists
  91: <reactive>
  75: new_entries
  74: observeEventHandler
   3: shiny::runApp
   2: runGadget
   1: citr:::insert_citation

I have to reload the libraries before I can use it again. And even that often doesn't work. I have to restart RStudio then.

> sessioninfo::session_info()
─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 os       Manjaro Linux               
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       Europe/Berlin               
 date     2018-11-30                  

─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package     * version    date       lib source                    
 assertthat    0.2.0      2017-04-11 [1] CRAN (R 3.5.1)            
 bibtex        0.4.2      2017-06-30 [1] CRAN (R 3.5.1)            
 citr          0.2.0.9055 2018-11-16 [1] Github (crsh/citr@68298af)
 cli           1.0.1      2018-09-25 [1] CRAN (R 3.5.1)            
 crayon        1.3.4      2017-09-16 [1] CRAN (R 3.5.1)            
 curl          3.2        2018-03-28 [1] CRAN (R 3.5.1)            
 digest        0.6.18     2018-10-10 [1] CRAN (R 3.5.1)            
 htmltools     0.3.6      2017-04-28 [1] CRAN (R 3.5.1)            
 httpuv        1.4.5      2018-07-19 [1] CRAN (R 3.5.1)            
 httr          1.3.1      2017-08-20 [1] CRAN (R 3.5.1)            
 jsonlite      1.5        2017-06-01 [1] CRAN (R 3.5.1)            
 later         0.7.5      2018-09-18 [1] CRAN (R 3.5.1)            
 lubridate     1.7.4      2018-04-11 [1] CRAN (R 3.5.1)            
 magrittr      1.5        2014-11-22 [1] CRAN (R 3.5.1)            
 mime          0.6        2018-10-05 [1] CRAN (R 3.5.1)            
 miniUI        0.1.1.1    2018-05-18 [1] CRAN (R 3.5.1)            
 plyr          1.8.4      2016-06-08 [1] CRAN (R 3.5.1)            
 promises      1.0.1      2018-04-13 [1] CRAN (R 3.5.1)            
 R6            2.3.0      2018-10-04 [1] CRAN (R 3.5.1)            
 Rcpp          1.0.0      2018-11-07 [1] CRAN (R 3.5.1)            
 RefManageR    1.2.0      2018-04-25 [1] CRAN (R 3.5.1)            
 rlang         0.3.0.1    2018-10-25 [1] CRAN (R 3.5.1)            
 rstudioapi    0.8        2018-10-02 [1] CRAN (R 3.5.1)            
 sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 3.5.1)            
 shiny       * 1.2.0      2018-11-02 [1] CRAN (R 3.5.1)            
 shinyjs       1.0        2018-01-08 [1] CRAN (R 3.5.1)            
 stringi       1.2.4      2018-07-20 [1] CRAN (R 3.5.1)            
 stringr       1.3.1      2018-05-10 [1] CRAN (R 3.5.1)            
 withr         2.1.2      2018-03-15 [1] CRAN (R 3.5.1)            
 xml2          1.2.0      2018-01-24 [1] CRAN (R 3.5.1)            
 xtable        1.8-3      2018-08-29 [1] CRAN (R 3.5.1)            
 yaml          2.2.0      2018-07-25 [1] CRAN (R 3.5.1)            

[1] /home/clemens/R/x86_64-pc-linux-gnu-library/3.5
[2] /usr/lib/R/library
crsh commented 5 years ago

Hi, thanks for reporting this. I think I fixed this bug two days ago. Could you try whether reinstalling from GitHub fixes this problem?

nevrome commented 5 years ago

Oh - ja. Seems to be fine now. Excuse me for bothering you before installing the latest version! And thank you for the fast fix!

crsh commented 5 years ago

No problem, thanks for taking the time to report this. Bugs I have already fixed are the once I like best. ;)