# Spaces in full paths causing problems?

**URL:** <https://nextstrain.discourse.group/t/spaces-in-full-paths-causing-problems/1195>\
**Category:** Help and Getting Started\
**Created:** [July 22, 2022, 5:32pm UTC](https://nextstrain.discourse.group/t/spaces-in-full-paths-causing-problems/1195 "2022-07-22T17:32:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aamtemp](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@aamtemp](https://nextstrain.discourse.group/u/aamtemp)\
**Post date:** [July 22, 2022, 5:32pm UTC](https://nextstrain.discourse.group/t/spaces-in-full-paths-causing-problems/1195/1 "2022-07-22T17:32:05Z")

</div>

A couple of days ago I updated Nexstrain (actually deleted and re-installed it) and updated the ncov build. I don’t remember when I had installed my previous environment, but everything had been working perfectly till then. Now, any attempts at running the same builds I was previously running fail, seemingly at different steps in the workflow. The command I run from the ncov folder is `nextstrain build . --cores all --configfile my_profiles/haiti/builds.yaml`

It exits with “Exiting because a job execution failed. Look above for error message”. The only error message I see above is:

```auto
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `cd /Users/path/to/a folder name containing spaces and (parentheses)/ncov && /Users/username/opt/anaconda3/envs/nextstrain/bin/python3.8 -m snakemake --snakefile '/Users/path/to/folder name containing spaces and (parentheses)/ncov/Snakefile' 'results/haiti/description.md' --allowed-rules 'build_description' --cores 8 --attempt 1 --force-use-threads --quiet all --force --keep-target-files --keep-remote --max-inventory-time 0 --nocolor --notemp --no-hooks --nolock --ignore-incomplete --rerun-triggers 'code' 'input' 'params' 'software-env' 'mtime' --skip-script-cleanup --conda-frontend 'mamba' --wrapper-prefix 'https://github.com/snakemake/snakemake-wrappers/raw/' --local-groupid 'local' --configfiles '/Users/path/to/folder name containing spaces and (parentheses)/ncov/my_profiles/haiti/builds.yaml' --printshellcmds --latency-wait 5 --scheduler 'ilp' --scheduler-solver-path '/Users/username/opt/anaconda3/envs/nextstrain/bin' --default-resources 'tmpdir=system_tmpdir' --mode 1'

```

(edited the paths to remove other people’s identifying information)

My interpretation of this is that the problem is that the full path contains a folder where the name contains spaces and parentheses. I cannot change this – it’s a lab-wide shared OneDrive folder where we keep all our shared analyses. Whichever previous version of Nextstrain/ncov I was using did not have a problem with this. Is there something I can tweak somewhere that will make it able to run again? (Or, is the problem something else and I’m misinterpreting? Let me know if there are any logs or anything else I should look at.)

Thank you!

---

<div class="post-metadata">

**Author:** ![trs](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/trs/32/5_2.png) [@trs](https://nextstrain.discourse.group/u/trs)\
**Post date:** [July 22, 2022, 10:18pm UTC](https://nextstrain.discourse.group/t/spaces-in-full-paths-causing-problems/1195/2 "2022-07-22T22:18:25Z")

</div>

Your interpretation is correct, AFAICT. This appears to be a bug in Snakemake that was introduced in 7.3.0 and “fixed” but not fully in 7.3.6. I’ve [added a comment](https://github.com/snakemake/snakemake/issues/1546#issuecomment-1192972609) to the upstream bug report.

I thought that using symlinks might let you workaround the bug, but unfortunately Snakemake seems to fully resolve the working dir, negating that.

---

<div class="post-metadata">

**Author:** ![trs](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/trs/32/5_2.png) [@trs](https://nextstrain.discourse.group/u/trs)\
**Post date:** [July 22, 2022, 10:22pm UTC](https://nextstrain.discourse.group/t/spaces-in-full-paths-causing-problems/1195/3 "2022-07-22T22:22:17Z")

</div>

Your best workaround is probably to downgrade Snakemake in your Conda environment for now, something like:

```auto
mamba install -n nextstrain 'snakemake<7.3.0'

```

(replace `mamba` with `conda` if you don’t have `mamba`).

I’ve confirmed this works for me locally.

---

<div class="post-metadata">

**Author:** ![aamtemp](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@aamtemp](https://nextstrain.discourse.group/u/aamtemp)\
**Post date:** [July 25, 2022, 1:01pm UTC](https://nextstrain.discourse.group/t/spaces-in-full-paths-causing-problems/1195/4 "2022-07-25T13:01:06Z")

</div>

thank you! this seems to have worked.
