RevolutionAnalytics / checkpoint

Install R packages from snapshots on checkpoint-server
164 stars 38 forks source link

object of type 'environment' is not subsettable #312

Closed timspit closed 2 years ago

timspit commented 2 years ago

Hello - have used checkpoint a lot on previous projects, adding it now to an existing project folder (with the most basic call of checkpoint("2021-02-01")) and getting the following error:

Creating checkpoint directory [[MY HOME DIR]]/.checkpoint/2021-02-01/lib/x86_64-pc-linux-gnu/3.6.3
Error in x[] <- if (!is.list(x)) x else if (inherits(x, "condition")) "<error>" else if (is.recursive(x)) lapply(x,  : 
  object of type 'environment' is not subsettable

The execution halts and that error prints to console without any other threads to pull in terms of what is causing the error. Any ideas on what may be causing this? My initial troubleshooting step was to move out of the existing project (which has many files that may be tripping up checkpoint) and just start with one folder, one file, with checkpoint setting and loading in one library, but I still get the error.

TobiSonne commented 2 years ago

I had the same problem with the new version. Didn't have the problem with 0.4.10.

hongooi73 commented 2 years ago

As a workaround, try setting log=FALSE in the call to checkpoint.

sarahhaj commented 2 years ago

Same problem here. The log = FALSE workaround does not work for me. Instead it leads RStudio to crash.

checkpoint::checkpoint(snapshot_date = checkpoint.date, scan_r_only = TRUE, scan_rprofile = FALSE, log = FALSE)

hongooi73 commented 2 years ago

@sarahhaj what exactly do you mean by "it leads RStudio to crash"?

sarahhaj commented 2 years ago

checkpoint is called in an .RProfile file of an R Project. By "crashing" I mean that when opening the project RStudio opens just as a white window and nothing happens even when the snapshot folder already exists.

hongooi73 commented 2 years ago

That seems to be a separate issue. Does checkpoint work if you run it manually, ie, not inside .Rprofile?