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
Error in .rs.parsePackageDependencies(contents, extension) : object 'partition_yaml_front_matter' not found after update to R 4.2.1 #11552
Comments
|
@FMKerckhof Thanks for bringing over the issue! can you provide a simple example of an R Markdown file that causes this, specifically so that I can try to start with the same first step? This way I can try to reproduce exactly the same way. Triage: Detailed conversation with @Cdrev is at the referenced rmarkdown issue. |
|
Hi @ronblum I am not sure if the issue is linked to the markdown file in specific but rather to the way the project "caches" certain information in ---
title: |
`){width=25%}
Reprex for R markdown
author: "FM Kerckhof"
date: "`r Sys.Date()`"
fontsize: 9pt
output:
html_document:
code_folding: show
highlight: haddock
keep_md: yes
theme: flatly
toc: yes
number_sections: true
toc_float:
collapsed: no
smooth_scroll: yes
toc_depth: 4
editor_options:
chunk_output_type: console
---
# obviously the chunks below should have the triple apostrophes, but that messes with the github formatting
``{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
options("yaml.eval.expr" = TRUE)
``
## R Markdown
This is an R Markdown document.
``{r cars}
summary(cars)
``
## Including Plots
You can also embed plots, for example:
``{r pressure, echo=FALSE}
plot(pressure)
``
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
|
|
What version of the |
|
This is where we call into rstudio/src/cpp/session/modules/SessionCodeTools.R Lines 2293 to 2296 in f13476a
The only way I can see this error occurring is if an unexpected version of https://github.com/rstudio/rmarkdown/blame/main/R/output_format.R#L726 You could check whether |
|
@kevinushey apologies - it's pretty difficult to generate a reproducible example that includes switching R versions. I'll see if I can spin up some rocker/rstudio containers for each version and if I can reproduce the issue by upgrading the 4.2.0 to 4.2.1 container (although those are linux containers afaik). The rmarkdown package version is 2.14 both before and after the update. Checking my output of |
|
You could do something like the following: and then see if you can get the R debugger to "catch" the error, and introspect a bit more on the call stack / state of the |
|
I have encountered the same issue. My R version is R 4.2.0. Besides the annoying error messages I saw when I open Rstudio, it didn't stop me running the code (however I couldn't render .Rmd file anymore), so I didn't bother to investigate further. I vaguely remember it happened after I upgraded Rstudio (or updated some R packages. Forgot which ones, sorry). Here is the printout of the error messages: My current Rstudio version is RStudio 2022.07.0+547 - Windows 10/11 (64-bit), but this happened at least a couple of versions back. BTW, somebody else also reported the same problem here: Thanks! |
|
I have also been running into this over last few weeks, probably after the 4.2.1 install but maybe after an rstudio update? (running 2022.02.3 Build 492 on macos 12.4.) My insight is that the error appears on startup (and only on startup) if a markdown document is in the selected tab of the Rstudio file editor. The error is delayed a second or two after the initial R startup text. If an R script is selected in the file editor, the error does not appear. `R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid" R is free software and comes with ABSOLUTELY NO WARRANTY. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'demo()' for some demos, 'help()' for on-line help, or Error in .rs.parsePackageDependencies(contents, extension) :
Matrix products: default locale: attached base packages: loaded via a namespace (and not attached): |
|
I second these observations. I also noticed that if you're running a r markdown notebook, it can't generate the .nb.html anymore.
|
|
Thanks, I was finally able to reproduce. In sum, I needed to do the following:
For me, the error only seems to occur if I have two documents open in the session. |
|
I think I've figured out the issue. The problem here is occurring in this way:
The simplest workaround to this issue is to load |
|
For reference: |
|
One potential way to resolve this on the RStudio side -- in this call: rstudio/src/cpp/session/modules/SessionCodeTools.R Lines 16 to 22 in f895778
Add a check of the form: This is how R itself detects cyclic namespace loading; e.g. A somewhat heavier hammer would be a similar approach, but refuse to run any RPC methods whenever we're loading a package namespace. I'm not positive where we'd make that check off-hand, though. |
|
Adding to triage as this is probably a candidate for a SW patch; given that it has a fairly simple workaround I don't think it's enough to hold up the release. |
|
I agree, this shouldn't hold up the SW release but could be considered for a patch. |
|
I am just curious, why after restoring the older version of rlang1.0.2 instead of rlang1.0.3, the problem disappears, why just restoring to older version of rlang for the time being which I did at the moment. |
The newest release of |
|
Another potential way to solve this error is to create a new R studio project. |
|
We've just added a potential fix to the daily builds at dailies.rstudio.com.
you're welcome to try downloading the latest release and confirm if the
problem is resolved.
…On Fri, Jul 22, 2022, 5:28 PM Stefano Casirati ***@***.***> wrote:
Another potential way to solve this error is to create a new R studio
project.
—
Reply to this email directly, view it on GitHub
<#11552 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3UVGKYNNY6NYJ3MSM3RZ3VVMHA7ANCNFSM52V5YOOA>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
|
The error does appear fixed in Deleting the .Rproj.user folder didn't solve the problem for me in |
|
@fgeeri Thank you for testing this! I'm glad to hear that it's working in the version currently in progress. |
System details
Steps to reproduce the problem
update.packages(ask = FALSE, checkBuilt = TRUE).Rproj.userwith the IDE closed and restarting removes the error messageDescribe the problem in detail
This issue is referred to from an issue at rstudio/rmarkdown: rstudio/rmarkdown#2389
the error messages:
Deleting
.Rproj.user(or for some users a downgrade of rlang - cf. linked issue above) appears to resolve the problem - so something there (a certain cache?) appears to cause the error.Creating a new project after the update also does not lead to the error message.
Describe the behavior you expected
.Rproj.useris not something I would normally do when updating a minor version of R (or a major version for that matter)The text was updated successfully, but these errors were encountered: