Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in 7.32.4 trying to access outputs with the rules object: 'Namedlist' object has no attribute <x> #2481

Open
nickp60 opened this issue Oct 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@nickp60
Copy link

nickp60 commented Oct 13, 2023

Snakemake version
I experience this bug with snakemake 7.32.4, but not with 7.31.1 or prior versions. The versions in between (7.32.0, 7.32.1, etc) appear to have unrelated bugs that have been addressed elsewhere.

Describe the bug
I am having errors in a pipeline we run routinely that we have tracked down to recent changes to how snakemake allows access to the rules object. The error I get is as follows:

AttributeError in file $HOME/GitHub/vdblab-shotgun/workflow/rules/hostdeplete.smk, line 163:
'Namedlist' object has no attribute 'bam'
  File "/lila/home/watersn/GitHub/vdblab-shotgun/workflow/Snakefile", line 70, in <module>
  File "/lila/home/watersn/GitHub/vdblab-shotgun/workflow/rules/preprocess.smk", line 259, in <module>
  File "/lila/home/watersn/GitHub/vdblab-shotgun/workflow/rules/hostdeplete.smk", line 163, in <module>

The workflow module in questions is here: https://github.com/vdblab/vdblab-shotgun/blob/main/workflow/rules/hostdeplete.smk

Additional context
This appears to be related to changes introduced here: #2404

@nickp60 nickp60 added the bug Something isn't working label Oct 13, 2023
@nickp60
Copy link
Author

nickp60 commented Jan 17, 2024

This persists in 8.2.0

nickp60 added a commit to vdblab/vdblab-shotgun that referenced this issue Jan 17, 2024
Issues like snakemake/snakemake#2481 persisted in 8.2.0, and it
appears to be resolved after I simplified these imports.  previously, the Snakefile used the
preprocess module which used the hostdeplete module which used the snap and bowtie2 modules.
I moved the code from the snap and bowtie2 modules into the hostdeplete one, and many
strange errors went away.
@nickp60
Copy link
Author

nickp60 commented Jan 17, 2024

I was able to get around this by simplifying the import structure of the workflow. It seems like 4 levels of imports was too much for snakemake :/ , as consolidating snakefiles to 3 levels of imports resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant