Closed cledna closed 4 years ago
Fixed by modifying paths to be of the form joinpath(dirname(pathof(MimiCIAM)), '../data')
Relative paths should just work for include
statements, but not for any other file loading stuff.
For file loading, the best way to express things is joinpath(@__DIR__, "..", "data")
for example. @__DIR__
returns the full path of the file where it is written, and then the rest is probably clear.
I noticed that the relative paths don't seem to work properly when the model is run as a package. E.g when I type:
MimiCIAM.get_model()
I get the following error:It seems to suggest that the scripts are calling the paths relative to the user's location, rather than the source file's location. Any thoughts on how to fix this @lrennels ?