Job execution is stalling with the following error:
Traceback (most recent call last):
File “scripts/sanitize_metadata.py”, line 2, in
from augur.io import open_file, read_metadata
ImportError: cannot import name ‘read_metadata’ from ‘augur.io’ (/opt/miniconda3/envs/nextstrain/lib/python3.8/site-packages/augur/io.py)
Hi @jkhattra - could you let us know how you installed augur, what version you are using (you can find this via augur --version), and how you are running the snakefile (e.g. are you using snakemake or nextstrain build?). We’ll try to help debug this!
Hi James! I followed the Install Nextstrain with Conda and the SARS-CoV-2 Workflow documentation for installation. No customization. The Zika and SARS-CoV-2 global subsampling examples worked perfectly.
Version is augur 12.0.0. Am using snakemake.
I don’t know if the following is relevant, but the sanitize_metadata.py script has “import csv” in line 3, not tsv.
Welcome @jkhattra! This error occurs because we added the read_metadata function to augur.io in version 12.1.0 and your local version of Augur is 12.0.0. There are a couple of different ways to fix the issue:
Install and run Nextstrain with the CLI and Docker. The Nextstrain CLI can run workflows with a Docker image that has all of the Nextstrain tools installed. The CLI also includes an update command that allows you to easily update these tools to their latest versions.
Do you want to try one of these approaches and let us know if it fixes the issue?
In addition to our regular updates to Nextstrain’s software tools, we also regularly update the ncov workflow. When we make changes to the workflow that could require you to update your software or make a change to your workflow configuration files, we note these breaking changes in our change log with a new versioned release. If you update to the latest version of the workflow and something breaks, there is a good chance we’ve made a new major release and you’ll need to check out the change log for details.