-
Notifications
You must be signed in to change notification settings - Fork 154
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
renv::snapshot() not working and returning an error #2110
Comments
Can you provide the output of |
... why not just share the whole report? |
Diagnostics Report [renv 1.1.2]/etc/lsb-release -----------------------------------------------------------DISTRIB_ID=Ubuntu /etc/os-release ------------------------------------------------------------PRETTY_NAME="Ubuntu 22.04.4 LTS" Session Info ---------------------------------------------------------------R version 4.3.3 (2024-02-29) Matrix products: default locale: time zone: Etc/UTC attached base packages: loaded via a namespace (and not attached): Project --------------------------------------------------------------------Project path: "~/repos/advance42" Status ---------------------------------------------------------------------The following package(s) are out of sync [lockfile != library]: CRAN -----------------------------------------------------------------------
See Packages -------------------------------------------------------------------Traceback (most recent calls last): R System Requirements ------------------------------------------------------Traceback (most recent calls last): ABI ------------------------------------------------------------------------The following packages were built against a newer version of Rcpp than is currently available:
User Profile ---------------------------------------------------------------[1] Source Package Require Version Dev Settings -------------------------------------------------------------------List of 13 Options --------------------------------------------------------------------List of 12 Environment Variables ------------------------------------------------------HOME = /home/ubuntu PATH -----------------------------------------------------------------------
Cache ----------------------------------------------------------------------There are a total of 265 packages installed in the renv cache. |
Does your project contain R Markdown files or Quarto Markdown files with custom chunk headers? The warnings printed would suggest you have some labels which aren't plain strings; rather, they're character vectors or something else. Most likely, there's a file in your project that's tripping up |
I have a potential fix / workaround for this in the development version of renv. You can try installing it with:
Can you give this a try and let me know if the issue persists? |
I do have a lot of .Rnw files with those. My other projects have this as well though, so maybe there's something off about one of them. I tried running snapshot again after downloading the development version, but got the same error |
This was not always the case for this project, but when I run
renv::snapshot()
, it immediately returns the following error:Error in if (package == "R") return() :
missing value where TRUE/FALSE needed
Traceback (most recent calls last):
9: renv::snapshot()
8: alt <- new <- renv_lockfile_create(
project = project,
type = type,
libpaths = libpaths,
packages = packages,
exclude = exclude,
prompt = prompt,
force = force,
dev = dev
) at snapshot.R#179
7: lockfile <- withRestarts(
renv_lockfile_create_impl(project, type, libpaths, packages, exclude, prompt, force, dev = dev),
renv_recompute_records = function() {
renv_dynamic_reset()
renv_lockfile_create_impl(project, type, libpaths, packages, exclude, prompt, force, dev = dev)
}
) at lockfile.R#181
6: withOneRestart(expr, restarts[[1L]])
5: doWithOneRestart(return(expr), restart)
4: lockfile <- withRestarts(
renv_lockfile_create_impl(project, type, libpaths, packages, exclude, prompt, force, dev = dev),
renv_recompute_records = function() {
renv_dynamic_reset()
renv_lockfile_create_impl(project, type, libpaths, packages, exclude, prompt, force, dev = dev)
}
) at lockfile.R#181
3: records <- renv_snapshot_packages(
packages = setdiff(packages, exclude),
libpaths = libpaths,
project = project
) at lockfile.R#202
2: paths <- renv_package_dependencies(
packages = packages,
libpaths = libpaths,
callback = callback,
project = project
) at snapshot.R#1176
1: for (package in packages)
renv_package_dependencies_impl(package, visited, libpaths, fields, callback, project) at package.R#292
The text was updated successfully, but these errors were encountered: