I have been running workflows using the Nextstrain CLI for the last 3 months.
However, today I tried to run a workflow but keep getting this error:
Traceback (most recent call last):
File "/Users/nikitasitharam/.nextstrain/runtimes/conda/env/lib/python3.11/site-packages/snakemake/__init__.py", line 792, in snakemake
success = workflow.execute(
^^^^^^^^^^^^^^^^^
File "/Users/nikitasitharam/.nextstrain/runtimes/conda/env/lib/python3.11/site-packages/snakemake/workflow.py", line 1246, in execute
raise e
File "/Users/nikitasitharam/.nextstrain/runtimes/conda/env/lib/python3.11/site-packages/snakemake/workflow.py", line 1242, in execute
success = self.scheduler.schedule()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nikitasitharam/.nextstrain/runtimes/conda/env/lib/python3.11/site-packages/snakemake/scheduler.py", line 617, in schedule
run = self.job_selector(needrun)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/nikitasitharam/.nextstrain/runtimes/conda/env/lib/python3.11/site-packages/snakemake/scheduler.py", line 758, in job_selector_ilp
from stopit import ThreadingTimeout as Timeout, TimeoutException
File "/Users/nikitasitharam/.nextstrain/runtimes/conda/env/lib/python3.11/site-packages/stopit/__init__.py", line 10, in <module>
import pkg_resources
File "/Users/nikitasitharam/.nextstrain/runtimes/conda/env/lib/python3.11/site-packages/pkg_resources/__init__.py", line 95, in <module>
from jaraco.text import drop_comment, join_continuation, yield_lines
File "/Users/nikitasitharam/.nextstrain/runtimes/conda/env/lib/python3.11/site-packages/setuptools/_vendor/jaraco/text/__init__.py", line 12, in <module>
from jaraco.context import ExceptionTrap
File "/Users/nikitasitharam/.nextstrain/runtimes/conda/env/lib/python3.11/site-packages/setuptools/_vendor/jaraco/context.py", line 17, in <module>
from backports import tarfile
ImportError: cannot import name 'tarfile' from 'backports' (/Users/nikitasitharam/.nextstrain/runtimes/conda/env/lib/python3.11/site-packages/backports/__init__.py)
Steps I have done so far and still receiving the same error:
Deleted the conda environment giving me this issue
Installed Nextstrain CLI in a new conda env using bioconda
I have the Nextstrain CLI installed on another machine with the same operating system and it works there. I copied the specs and tried to set up a new conda env using those specs.
Here is the spec file of the conda env that is working on another OS machine spec-file.txt (13.4 KB)
Hi @NikitaSitharam, we’ve run into this issue at least once before and the best workaround seemed to be running nextstrain setup conda --force on the computer where you’ve experienced the error. This command tells the Nextstrain CLI to delete its managed Conda environment and reinstall from scratch which should have a similar effect as the fresh installation you made on your other computer. With this approach, you don’t have to delete any Conda environments manually yourself or manage Conda env specs, so it should hopefully be a simpler process.
If you run that command above, does it fix the issue for you?
The output seems to be truncated. I just ran it and noticed that it it can take a few minutes before anything is printed after the line conda (default). Can you re-run and check if anything else is shown?
Here is mine for reference:
nextstrain.cli 8.5.1
Python
/Users/victor/.nextstrain/cli-standalone/nextstrain
3.10.9 (main, Dec 20 2022, 19:01:09) [Clang 14.0.3 ]
Runners
docker
Cannot connect to the Docker daemon at unix:///Users/victor/.docker/run/docker.sock. Is the docker daemon running?
unknown
conda (default)
env: node: No such file or directory
nextstrain-base 20240822T214654Z (h0dc7051_0_locked, nextstrain)
augur 25.3.0
singularity
docker://nextstrain/base (not present)
ambient
unknown
aws-batch
unknown
It looks like you have the latest version of the conda runtime, 20241010T175750Z. Did you already apply the fix of nextstrain setup conda --force? If so, are you still seeing the workflow execution error from your first post?