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 users run the nextstrain build command from Windows with Docker and provide an argument to Snakemake that references a local path using backslashes (e.g., nextstrain build . --configfile my_profiles\myconfig.yaml), Snakemake throws a FileNotFoundError. The error occurs because the file path is interpreted from a Linux operating system inside the Docker container or WSL2 VM where that path actually does not exist. However, this error is confusing for the user when they can clearly see the file on their local file system from Windows.
Expected behavior
Users should be able to provide a valid Windows path to nextstrain build and have it interpreted as expected, only returning an error if that file really does not exist.
How to reproduce
# Clone ncov repo.
git clone https://github.com/nextstrain/ncov.git
cd ncov
# Run Nextstrain's CI build from Windows.
nextstrain build . --configfile nextstrain_profiles\nextstrain-ci\builds.yaml
Possible solutions
Automatically convert slashes in paths for specific Snakemake arguments. We already pre-process some Snakemake arguments as part of the CLI, so this would not be unprecedented. Which arguments to process isn't as clear. Maybe just --configfile and --profile, to start.
Automatically convert all slashes in all path-like inputs? Probably hard to do correctly in every case, but would make behavior consistent across all Snakemake arguments unlike the special-casing approach above where --stats, for example, would behave differently from --configfile.
Create a troubleshooting page in our documentation with this specific example. We could at least reference this page from our own docs/office hours and users could find it via web search of the error message.
Encourage users to use forward slashes (/) on any supported operating system, since Windows accepts both types.
Your environment: if browsing Nextstrain online
Operating system: Windows
Your environment: if running Nextstrain locally
Operating system: Windows
Additional context
Thanks to Bryan Tegomoh for reporting this issue.
The text was updated successfully, but these errors were encountered:
Current Behavior
When users run the
nextstrain build
command from Windows with Docker and provide an argument to Snakemake that references a local path using backslashes (e.g.,nextstrain build . --configfile my_profiles\myconfig.yaml
), Snakemake throws aFileNotFoundError
. The error occurs because the file path is interpreted from a Linux operating system inside the Docker container or WSL2 VM where that path actually does not exist. However, this error is confusing for the user when they can clearly see the file on their local file system from Windows.Expected behavior
Users should be able to provide a valid Windows path to
nextstrain build
and have it interpreted as expected, only returning an error if that file really does not exist.How to reproduce
Possible solutions
--configfile
and--profile
, to start.--stats
, for example, would behave differently from--configfile
./
) on any supported operating system, since Windows accepts both types.Your environment: if browsing Nextstrain online
Your environment: if running Nextstrain locally
Additional context
Thanks to Bryan Tegomoh for reporting this issue.
The text was updated successfully, but these errors were encountered: