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
fix: add quotes to each item of the wait_for_files list #1160
Conversation
I noticed that the bug was also affecting files with white spaces. So I came with a better solution to quote every item of the I also tested the behavior of Snakemake when having more than 20 elements in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! Very good idea. Python allows to make the changed code a bit simpler, see below.
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
* Add quotes to tmp dir in wait-for-file options * Add quotes to each item of the wait_for_files list * Add quotes to the wait_for_files_file path * Improve quoting strategy * Format following Black code style Co-authored-by: Johannes Köster <johannes.koester@uni-due.de>
Hello Snakemake team,
Description
Context: Job submission to SGE cluster using
qsub
from a folder with a path containing a white space.Problem: First batch of jobs is successfully submitted but snakemake issue an error regarding missing files. Below is the typical error issued when submitting a job from `$HOME/test test/':
The error is due to the absence of quotes around the tmp directory path when generating the job script. The typical line for the the
wait-for-files
options is as follows:--wait-for-files /XXXX/test test/.snakemake/tmp.6tq2tga_ test test2 --latency-wait 10 \
but should be:
Solution: Add quotes when appending the path to the
wait_for_files
list.Comments
The solution has been tested in cases with white space and and with special character (&).
I am not fluent enough in Python so feel free to edit the code if needed.
Minimal reproducible example
In case this needs to be reproduced.
QC
docs/
) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).Thank you for considering this patch.