Xaringan: Error in path.expand(path) : invalid 'path' argument

Created on 1 Feb 2017  路  4Comments  路  Source: yihui/xaringan

When calling inf_mr() on Windows. On macOS the same .Rmd runs fine. I do not know which path is causing problems so I can not really debug it. Played around with the images paths and the background-image paths but did not succeed. Any idea?

Debug inf_mr():

# level 2 
debug: moon = context_fun()[["path"]]

# level 3
debug: context$selection <- as.document_selection(context$selection)

Error: 'x' should be a list of {range, text} pairs

File: R-intro.Rmd.zip

bug

Most helpful comment

Should be fixed now. Thanks for the report! You can install the development version via

devtools::install_github('yihui/xaringan')

All 4 comments

I don't think this issue has anything to do with xaringan. Please provide devtools::session_info('xaringan'). If it is not the latest dev version, or your RStudio is not the latest stable version, please upgrade first.

Hi, xie da da,
Everything works fun except that when I run the xaringan::infinite_moon_reader() function锛宼he same error appears,

> xaringan::infinite_moon_reader()
Error in path.expand(path) : invalid 'path' argument

I use win10 and here is my session_info,

> devtools::session_info("xaringan")
Session info ---------------------------------------------------------------------------------------------------------
 setting  value                         
 version  R version 3.3.2 (2016-10-31)  
 system   x86_64, mingw32               
 ui       RStudio (1.0.44)              
 language (EN)                          
 collate  Chinese (Simplified)_China.936
 tz       Asia/Taipei                   
 date     2017-02-14                    

Packages -------------------------------------------------------------------------------------------------------------
 package   * version date       source                            
 backports   1.0.4   2016-10-24 CRAN (R 3.3.2)                    
 base64enc   0.1-3   2015-07-28 CRAN (R 3.3.2)                    
 bitops      1.0-6   2013-08-17 CRAN (R 3.2.3)                    
 caTools     1.17.1  2014-09-10 CRAN (R 3.2.3)                    
 digest      0.6.10  2016-08-02 CRAN (R 3.2.5)                    
 evaluate    0.10    2016-10-11 CRAN (R 3.2.5)                    
 highr       0.6     2016-05-09 CRAN (R 3.2.5)                    
 htmltools   0.3.6   2016-11-18 Github (rstudio/htmltools@4fbf990)
 httpuv      1.3.3   2015-08-04 CRAN (R 3.2.5)                    
 jsonlite    1.1     2016-09-14 CRAN (R 3.3.2)                    
 knitr       1.15.1  2016-11-22 CRAN (R 3.3.2)                    
 magrittr    1.5     2014-11-22 CRAN (R 3.2.2)                    
 markdown    0.7.7   2015-04-22 CRAN (R 3.2.3)                    
 mime        0.5     2016-07-07 CRAN (R 3.2.5)                    
 Rcpp        0.12.8  2016-11-17 CRAN (R 3.3.2)                    
 rmarkdown   1.3     2016-12-21 CRAN (R 3.3.2)                    
 rprojroot   1.2     2017-01-16 CRAN (R 3.3.2)                    
 servr       0.5     2016-12-10 CRAN (R 3.3.2)                    
 stringi     1.1.2   2016-10-01 CRAN (R 3.2.5)                    
 stringr     1.1.0   2016-08-19 CRAN (R 3.2.5)                    
 xaringan    0.1.7   2017-02-13 Github (yihui/xaringan@6a2ea5d)   
 yaml        2.1.14  2016-11-12 CRAN (R 3.2.5) 

Waiting for your advice~

RStudio Version 1.0.136

BTW: "knitting" the .Rmd file works. Only inf_mr() throws the error.

devtools::session_info('xaringan')
Session info --------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.3.2 (2016-10-31)
 system   x86_64, mingw32             
 ui       RStudio (1.0.136)           
 language (EN)                        
 collate  German_Germany.1252         
 tz       Europe/Berlin               
 date     2017-02-05                  

Packages ------------------------------------------------------------------------------------------------
 package   * version date       source                         
 backports   1.0.5   2017-01-18 CRAN (R 3.3.2)                 
 base64enc   0.1-3   2015-07-28 CRAN (R 3.3.2)                 
 bitops      1.0-6   2013-08-17 CRAN (R 3.3.2)                 
 caTools     1.17.1  2014-09-10 CRAN (R 3.3.2)                 
 digest      0.6.12  2017-01-27 CRAN (R 3.3.2)                 
 evaluate    0.10    2016-10-11 CRAN (R 3.3.2)                 
 highr       0.6     2016-05-09 CRAN (R 3.3.2)                 
 htmltools   0.3.5   2016-03-21 CRAN (R 3.3.2)                 
 httpuv      1.3.3   2015-08-04 CRAN (R 3.3.2)                 
 jsonlite    1.2     2016-12-31 CRAN (R 3.3.2)                 
 knitr       1.15.1  2016-11-22 CRAN (R 3.3.2)                 
 magrittr    1.5     2014-11-22 CRAN (R 3.3.2)                 
 markdown    0.7.7   2015-04-22 CRAN (R 3.3.2)                 
 mime        0.5     2016-07-07 CRAN (R 3.3.2)                 
 Rcpp        0.12.9  2017-01-14 CRAN (R 3.3.2)                 
 rmarkdown   1.3     2016-12-21 CRAN (R 3.3.2)                 
 rprojroot   1.2     2017-01-16 CRAN (R 3.3.2)                 
 servr       0.5     2016-12-10 CRAN (R 3.3.2)                 
 stringi     1.1.2   2016-10-01 CRAN (R 3.3.2)                 
 stringr     1.1.0   2016-08-19 CRAN (R 3.3.2)                 
 xaringan    0.1.7   2017-02-01 Github (yihui/xaringan@fd2d7e0)
 yaml        2.1.14  2016-11-12 CRAN (R 3.3.2)      

I never published the draft of this comment - sorry for the late response :)

Should be fixed now. Thanks for the report! You can install the development version via

devtools::install_github('yihui/xaringan')
Was this page helpful?
0 / 5 - 0 ratings

Related issues

tcgriffith picture tcgriffith  路  4Comments

vcannataro picture vcannataro  路  4Comments

richardohrvall picture richardohrvall  路  3Comments

ekstroem picture ekstroem  路  6Comments

gavinsimpson picture gavinsimpson  路  4Comments