Closed RoiArthurB closed 4 years ago
Unbelievable that we still have these kinds of issues ... !
I'll push an update for the script to escape whitespaces for all parameters, but it doesn't solve the bug. It means that that bug comes from the headless itself (not the script to launch it).
I tested on win (may be not the case) , space work (with double quotes of course) What i wonder is how your path can convert from /home/roiarthurb/Documents/WORK/CoVid19/Containment Policies/models/experiment/Comparison Of 3 Measures.gaml to java.io.IOException: Model file does not exist: /home/roiarthurb/.local/share/GAMA_Continuous_Linux/headless/Measures.gaml Any special mechanism that can return .local/share??
I did tweak the default gama-headless.sh
to escape the whitespaces (with a back slash) which should work the same as adding quotes...
Otherwise you're true, double quotes did the trick (I don't know what I previously did wrong). This command worked :
$ java -cp ../plugins/org.eclipse.equinox.launcher_1.5.300.v20190213-1655.jar -Xms512m -Xmx4096m -Djava.awt.headless=true org.eclipse.core.launcher.Main -application msi.gama.headless.id4 -data .work5749 -xml Comparison "/home/roiarthurb/Documents/WORK/CoVid19/Containment Policies/models/experiment/Comparison Of 3 Measures.gaml" /tmp/out.xml
> JAI/ImageIO subsystem activated
Parameter file saved at: /tmp/out.xml
So I'll update again the script to properly put both last parameters between quotes :)
I'll also dig a bit in the headless to see if we can't have it both working (which would be the best solution)
Ok guys, so I dug the problem very deeply and, long story short, it was a POSIX problem in the launching script. So the headless seems to be working fine (without trouble with witespaces in path), I re-fixed the launching script, just have to check if the script works as well on Mac than on Linux and I commit it !
Describe the bug When launching the GAMA Headless, if there's any whitespace in a path to a model/anything the script won't consider it and return an error
To Reproduce Steps to reproduce the behavior:
Expected behavior Catch whitespaces
Logs
Desktop (please complete the following information):
Additional information The script remove escaped whitespace (
\
) and quoted string.Workaround It's possible to fix it by launching the headless by hand (without the provided script)