You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No sane person would put a space into their filename anyway (but it is allowed!), and in this case it wasn't even a legit filename but an error in the config file, but the result was very confusing:
# running cd /home/manaka/masters/.stimela_workdir-1621499929267005 && singularity run --workdir /home/manaka/masters/.stimela_workd
ir-1621499929267005 --containall --bind /home/manaka/masters/.stimela_workdir-1621499929267005/stimela_parameter_files/listobs_ms0-
14037095377404016214999292730052.json:/stimela_mount/configfile:ro --bind /home/manaka/caracaldir/venv2/lib/python3.6/site-packages/
stimela/cargo/cab/casa_listobs/src:/stimela_mount/code:ro --bind /home/manaka/masters/.stimela_workdir-1621499929267005/passwd:/etc/
passwd:rw --bind /home/manaka/masters/.stimela_workdir-1621499929267005/group:/etc/group:rw --bind /home/manaka/caracaldir/venv2/bin/stimela_runscript:/singularity:ro --bind /home/manaka/masters:/stimela_mount/msdir:rw --bind /home/manaka/masters/input:/stimela_mount/input:ro --bind /home/manaka/masters/test :/stimela_mount/output:rw --bind /home/manaka/masters/test /tmp:/stimela_mount/output/tmp:rw /home/manaka/masters/stimela_casa_1.6.3.sif /singularity
# FATAL: could not open image /home/manaka/masters/.stimela_workdir-1621499929267005/:/stimela_mount/output:rw: failed to retrieve path for /home/manaka/masters/.stimela_workdir-1621499929267005/:/stimela_mount/output:rw: lstat /home/manaka/masters/.stimela_workdir-1621499929267005/:: no such file or directory
I think the space in the filename is causing the shell to treat a single bind specification as two separate arguments, and that ends up confusing the singularity command.
I think the solution is to invoke xrun with shell=False, because then every item in the argument list is passed as a single argument to the underlying executable, untouched. Running with shell=True ought to be avoided as much as possible anyway. Why have an unnecessary and meddling middleman? There's other "creative" ways in which the shell can screw up our command line. If shell=True is required for whatever reason, then shlex.quote() should be applied to the arguments.
The text was updated successfully, but these errors were encountered:
No sane person would put a space into their filename anyway (but it is allowed!), and in this case it wasn't even a legit filename but an error in the config file, but the result was very confusing:
I think the space in the filename is causing the shell to treat a single bind specification as two separate arguments, and that ends up confusing the singularity command.
I think the solution is to invoke xrun with
shell=False
, because then every item in the argument list is passed as a single argument to the underlying executable, untouched. Running withshell=True
ought to be avoided as much as possible anyway. Why have an unnecessary and meddling middleman? There's other "creative" ways in which the shell can screw up our command line. Ifshell=True
is required for whatever reason, thenshlex.quote()
should be applied to the arguments.The text was updated successfully, but these errors were encountered: