-
Notifications
You must be signed in to change notification settings - Fork 0
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
possible fix for unable_to_load_module x in path y
#123
Comments
That's not what using the core functions does. box::use(utils)
utils$View()
utils$read.csv() The error you describe above is one that I get when I am interactively running line by line through a script in RStudio into my R console. It seems to be an error with not recognising the relevant pathing, but has nothing to do with the solution above, hence why there are never errors if you run the scripts from your terminal or on GitHub Actions. I've tried to look for this issue on the |
yea interesting, but I wonder why glad you opened an issue though - that should be informative! Two additional things I noticed:
|
A consequence of this error that is probably more significant than needing to run in 2x when running interactive is the fact that it makes the box::use(./src/utils/get_iso_sf)
#> Error in box::use(./src/utils/get_iso_sf): unable to load module "./src/utils/get_iso_sf"; not found in "/private/var/folders/61/cp06zhcj4y76q7rfx0qlm06c0000gn/T/RtmpXLAzDs/reprex-1642952289f88-bad-grub" Created on 2024-05-28 with reprex v2.0.2 |
You can't use those relative imports in the console, because it will only source based on the working directory, not where the file is source.
Yep, because as above the search dir is the working directory.
You have to specify the directory in |
I doubt that this actually helps! For me, what I have noticed and flagged in that issue on the |
Closing, and we can hopefully get some information in klmr/box#365. However, may be an issue outside of the control of |
I get this type of error every time I restart my R-session and first try to load a custom module. After the first error, it tends to go away.
@caldwellst @hannahker - do you get this also? I guess the GH runner doesnt!?
@caldwellst I remember we talked about this somewhere , but don't think we came to a clear solution and I wasn't able easily find the discussion.
Anways, the {box} FAQ page describes a very similar, but slightly different (I think) error message and the solution proposed it just to run this:
This does stop the error from occurring on my computer as well. It seems kind of annoying to put at the top of every script though. If this is in fact a good solution, I wonder if it could possibly make sense/work to have some sort of onLoad() type deal for it .
The text was updated successfully, but these errors were encountered: