Closed rrydbirk closed 5 months ago
Thanks for reporting! At first sight, this does indeed look like something system-specific caused by rstudiapi
. But let's hope it's not so we can fix it faster!
It would be helpful if you could post a minimal reproducible example? If not, can you say a bit about when it works (if ever) and when it doesn't? Is R6 classes a necessary condition? Does lm(mpg~cyl, mtcars)
work?
To see whether it's job
or rstudioapi
, could I ask you to try:
rstudioapi::jobRunScript(path_to_script)
If this works, it's job
-specific. If it doesn't, then it's probably rstudioapi
and we can work to file a bug there.
Indeed, it looks like it's job
-specific. Running lm(mpg~cyl, mtcars)
as a job fails with the same error message, while rstudioapi::jobRunScript(path_to_script)
succeeds. FYI, I just created a script with
data(mtcars)
lm(mpg~cyl, mtcars)
Ah, good. It may be a week or two before I can return to this.
Hello, Just out of curiosity, have you found the cause of this problem? I'm getting the same error message at the end of one of my jobs. Everything inside the job runs fine, it seems to happen during the export. We are a team using the same tool and only some of us are getting the error.
job::job({
options(warn = 1)
source(here::here("....R"), local = TRUE)
cat('\n============ \nSUCCESS \nYou can now launch the second job. \n============')
job::export('none')
},
import = c(input_folder, user_input_file, path_user_input))
Thanks!
============
SUCCESS
You can now launch the second job.
============
==============
2023-09-06 12:20:42: Done.
Error in save(list = ls(envir = sourceEnv, all.names = TRUE), file = exportRdata, :
'file' must be non-empty string
Calls: sourceWithProgress -> save
Execution halted
@bspoorenberg no, I didn't look much more into it. But it's quite a unique opportunity that you experience both behaviors in your team!
Could you try replacing the last line with one of these (or both) and report what happens?
export(NULL)
rm(list = ls())
Sorry I've just checked with the person who had this error, and she doesn't get it anymore. I will let you know in case we are able to check.
I'm closing this issue for now because it lacks reproducibility. Reopen if it persists and you can identify (or narrow in on) the conditions under which it occurs.
Thank you for an amazing tool that really speeds up everyday work!
Unfortunately, lately I've been experiencing issues where I get this error message:
Honestly, I don't really understand the error message so it's hard for me to debug. I run the jobs using the addin for RStudio choosing
Run selection as job
. I've gotten this error both for updating R6 envs (which I thought was just a limitation) but also for creating novel objects that doesn't already exist in global env. Last time I got this I was runningfit.obj <- tradeSeq::fitGAM(...)
but I've also received it from various other function calls. Our sys adms just up'ed our partition on /tmp/ to 100 GB, and /tmp/ is currently empty so I don't think that's the problem. Also, now I've run this particular job in a separate R session andCould you help me understand what is going on/what I'm doing wrong? The jobs finish W/O problems otherwise. Thanks!