Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packrat::status() fails with Rmd files #440

Closed
aschmu opened this issue Jan 12, 2018 · 5 comments
Closed

packrat::status() fails with Rmd files #440

aschmu opened this issue Jan 12, 2018 · 5 comments

Comments

@aschmu
Copy link

aschmu commented Jan 12, 2018

Hi,
I have a fairly complex projet that uses packrat and it's recently been failing with usual packrat function calls such as a status() or clean().
Here 's the output :

> packrat::unused_packages()
Error in eval(expr, envir, enclos) : objet 'html_output' introuvable

and my R session in the packrat managed top directory.

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 24 (Twenty Four)

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

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

other attached packages:
[1] packrat_0.4.8-54  wranglr_0.1.0     data.table_1.10.4 sqltools_0.1.1   

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.12     rstudioapi_0.6   bindr_0.1        knitr_1.15.1    
 [5] magrittr_1.5     R6_2.2.2         rlang_0.1.2      httr_1.2.1      
 [9] stringr_1.2.0    dplyr_0.7.3      tools_3.3.2      withr_1.0.2     
[13] htmltools_0.3.6  yaml_2.1.14      assertthat_0.2.0 digest_0.6.12   
[17] rprojroot_1.2    tibble_1.3.4     bindrcpp_0.2     infuser_0.2.6   
[21] RODBC_1.3-14     curl_2.8.1       memoise_1.0.0    glue_1.1.1      
[25] evaluate_0.10    rmarkdown_1.8    stringi_1.1.5    backports_1.0.5 
[29] pkgconfig_2.0.1 
> 
@kevinushey
Copy link
Contributor

Can you try running again with options(error = traceback) so I can see what code is executing? E.g.

options(error = traceback)
packrat::unused_packages()

@aschmu
Copy link
Author

aschmu commented Jan 15, 2018

Here's what I'm getting. Not super useful (objet 'html_output' introuvable means *** could not be found).

> options(error=traceback)
> packrat::unused_packages()
Error in eval(expr, envir, enclos) : objet 'html_output' introuvable
2: print.session_info(x)
1: function (x, ...) 
   UseMethod("print")(x)

@aschmu aschmu closed this as completed Jan 15, 2018
@aschmu aschmu reopened this Jan 15, 2018
@aschmu
Copy link
Author

aschmu commented Feb 5, 2018

Any idea what might be causing this ?
For now I'm having to manually move all Rmd files before packrat operations and then putting them back where they were once I'm done (e.g mv *.Rmd ../backup/-> packat::status() -> packat::snapshot() - > mv ../backup/*.Rmd .).
But this is clearly a tedious process.

@kevinushey
Copy link
Contributor

I don't have a good idea :-/ The error would imply that you're using a variable called html_output somewhere, but I'm not sure what package would be providing it or looking for it.

There should be a way of finding out what R code is being executed with some combination of

options(error = recover)
options(error = traceback)

but unfortunately the traceback I saw in your recent post didn't provide too much information (that seems to imply that the attempt to print session info was causing an error?)

@aronatkins
Copy link
Contributor

This problem was caused by using rmarkdown::render to analyze R Markdown files for dependencies.

We believe that this is resolved with #647.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants