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
When the workflow makes use of environment variables (by declaring them in envvars and then using them through os.environ), the workflow execution fails on batch schedulers because the jobscript gets the variable split by the space (it needs quoting).
Logs
Look at COVARIATE below
/nfs/my-path/.snakemake/tmp.fjbaxuov/snakejob.retrieve_data.3.sh: line 3: CACHE_PATH=/my-path/cache ACCESSIONS=E-MTAB-4395,E-MTAB-4342,E-MTAB-4128,E-MTAB-3826,E-MTAB-3173,E-MTAB-964,E-GEOD-62778,E-GEOD-54272 BATCH=study NEW_ACCESSION=E-CORN-1 COVARIATE=organism part COVARIATE_TYPE=characteristic: No such file or directory
Minimal example
Run any workflow that uses an env variable that has a space in the value in a cluster environment. On a local execution (no cluster), there is no issue.
Additional context
I suspect that the issue is here: https://github.com/snakemake/snakemake/blob/main/snakemake/executors/__init__.py#L795
although changing that on my side doesn't resolve the problem entirely, but I'm sure that the unquoted values are not helping. Unfortunately debugging this is difficult since the jobscript (snakejob.retrieve_data.3.sh) is deleted when snakemake exists.
The text was updated successfully, but these errors were encountered:
I went into the code and saved the file separately to another location. Besides the space, the problem seems to be that all envvars get surrounded in single quotes, acting as a single entity. This is resolved by setting https://github.com/snakemake/snakemake/blob/main/snakemake/executors/__init__.py#L801 to False. After that all seems to work. Will PR.
Snakemake version
6.2.1
Describe the bug
When the workflow makes use of environment variables (by declaring them in envvars and then using them through os.environ), the workflow execution fails on batch schedulers because the jobscript gets the variable split by the space (it needs quoting).
Logs
Look at COVARIATE below
Minimal example
Run any workflow that uses an env variable that has a space in the value in a cluster environment. On a local execution (no cluster), there is no issue.
Additional context
I suspect that the issue is here: https://github.com/snakemake/snakemake/blob/main/snakemake/executors/__init__.py#L795
although changing that on my side doesn't resolve the problem entirely, but I'm sure that the unquoted values are not helping. Unfortunately debugging this is difficult since the jobscript (snakejob.retrieve_data.3.sh) is deleted when snakemake exists.
The text was updated successfully, but these errors were encountered: