Workflow fails on Snakemake 8.x
ggonnella opened this issue · 4 comments
Current Behavior
InputFunctionException in rule colors in file /home/erik/ncov/workflow/snakemake_rules/main_workflow.smk, line 1097:
Error:
TypeError: unsupported operand type(s) for /: 'method' and 'int'
Wildcards:
build_name=Cambodian_build
Traceback:
File "/home/erik/ncov/workflow/snakemake_rules/main_workflow.smk", line 1114, in <lambda> (rule colors, line 2221, /home/erik/ncov/workflow/snakemake_rules/main_workflow.smk)
Expected behavior
No errors
Your environment: if running Nextstrain locally
- Operating system: Linux
- Browser: Chrome
- Version (e.g.
auspice 2.7.0
): auspice 2.54.1; nextclade2 2.14.0; nextalign 2.14.0; pangolin 1.1.5; pangolearn 2022.03.22
Additional context
After updating to the latest version of the pipeline (we run it in "ambient" mode), the error appears, when we are running nextstrain build. The latest version we had installed was in last December. Can you give an indication what could be the problem?
Hi @ggonnella,
The relevant line in the workflow is this one:
ncov/workflow/snakemake_rules/main_workflow.smk
Line 1114 in 6f58ff7
My guess is that you are using Snakemake 8.x. snakemake/snakemake@353a71c seems to have changed the representation of _IOFile.size
from a value to a function (a.k.a. 'method'
in your error message), which is something that would cause your error.
It's not stated anywhere in this repository, but this workflow currently does not support Snakemake 8.x and is only routinely run on Snakemake 7.32.3.
The easiest solution here would be for you to use a compatible Snakemake version. You could downgrade to version 7.x in your ambient environment or use one of Nextstrain's managed runtimes.
Thank you, indeed the problem was caused by the Snakemake version. I downgraded and it run correctly. Maybe it should be mentioned in the manual.
We don't plan to support Snakemake 8.x at the moment.
Opened a separate issue to document the compatibility requirements: #1118
Clarification: we don't plan to support Snakemake 8.x at the moment but could do so in the future. Timeline is unclear.