Closed DavidOry closed 5 years ago
The function will return nothing, but it probably should return an error message. Actually the error should be triggered if the the model state file is not present. Then there would be no need to check whether ModelState_ls is present.
I'm getting an error with exactly this situation when trying to run VEGUI, see comments at end of #207.
I am getting this error also. On my machine it is occurring because FileName doesn't exist. The function should handle the situation if the file does not exist better. For instance, if file.exists(FileName)
is FALSE, then the call to ls()
should look in the global environment, not the function environment, e.g. via ls(name = .GlobalEnv)
.
This problem seems to be Windows specific. I don't get this on a MacBook.
The c76159f commit fixes this by looking for ModelState_ls in the global environment instead of the function environment.
https://github.com/gregorbj/VisionEval/blob/c10bacba8e4edaf42a149b66af754264a5280eaa/sources/framework/visioneval/R/initialization.R#L148
What should happen here if
ModelState_ls
is not in the environment (i.e., not returned byls()
)?