Skip to content

Tutorial step 3 hangs #2008

Closed
Closed

Description

@hepcat72

Snakemake version
This is just in the tutorial in the docs...

Describe the bug
I was running through the snakemake tutorial in:

snakemake/docs/tutorial/setup.rst

And the command in step 3:

mamba env create --name snakemake-tutorial --file environment.yaml

just hangs. I googled and found the solution here:

https://stackoverflow.com/a/68645698/2057516

So I added python to the dependencies in the environment.yml file, and it worked. Might at least want to make a note of the issue in the tutorial?

Logs

Minimal example

Additional context

Activity

  1. added
    bug
    on Dec 13, 2022
  2. changed the title [-]Tutorial step 3 hangs - solved[/-] [+]Tutorial step 3 hangs[/+] on Dec 13, 2022
  3. hepcat72 commented on Dec 13, 2022

    @hepcat72
    Author

    Well, it seems adding python as a dependency only got me past step 3. When I try the first command on the next page, I get:

    $ snakemake -np mapped_reads/A.bam
    Building DAG of jobs...
    Traceback (most recent call last):
      File "/Users/rleach/.mambaforge/envs/snakemake-tutorial/lib/python3.8/site-packages/snakemake/__init__.py", line 701, in snakemake
        success = workflow.execute(
      File "/Users/rleach/.mambaforge/envs/snakemake-tutorial/lib/python3.8/site-packages/snakemake/workflow.py", line 1066, in execute
        logger.run_info("\n".join(dag.stats()))
      File "/Users/rleach/.mambaforge/envs/snakemake-tutorial/lib/python3.8/site-packages/snakemake/dag.py", line 2191, in stats
        yield tabulate(rows, headers="keys")
      File "/Users/rleach/.mambaforge/envs/snakemake-tutorial/lib/python3.8/site-packages/tabulate/__init__.py", line 2048, in tabulate
        list_of_lists, headers = _normalize_tabular_data(
      File "/Users/rleach/.mambaforge/envs/snakemake-tutorial/lib/python3.8/site-packages/tabulate/__init__.py", line 1471, in _normalize_tabular_data
        rows = list(map(lambda r: r if _is_separating_line(r) else list(r), rows))
      File "/Users/rleach/.mambaforge/envs/snakemake-tutorial/lib/python3.8/site-packages/tabulate/__init__.py", line 1471, in <lambda>
        rows = list(map(lambda r: r if _is_separating_line(r) else list(r), rows))
      File "/Users/rleach/.mambaforge/envs/snakemake-tutorial/lib/python3.8/site-packages/tabulate/__init__.py", line 107, in _is_separating_line
        (len(row) >= 1 and row[0] == SEPARATING_LINE)
      File "/Users/rleach/.mambaforge/envs/snakemake-tutorial/lib/python3.8/site-packages/snakemake/rules.py", line 1138, in __eq__
        return self.name == other.name and self.output == other.output
    AttributeError: 'str' object has no attribute 'name'
    

    Total mamba newb. First time installing/using it.

  4. hepcat72 commented on Dec 13, 2022

    @hepcat72
    Author

    It seems that following the tutorial, it installed an older version of snakemake?

    $ snakemake --version
    6.15.5
    

    So I got past the above AttributeError by installing the latest:

    conda deactivate
    

    ^^ This took me out of the snakemake-tutorial environment and back into base, where I...

    mamba create -c conda-forge -c bioconda -n snakemake snakemake
    mamba activate snakemake
    snakemake -np mapped_reads/A.bam
    

    ...and that succeeded without the attribute error.

  5. hepcat72 commented on Dec 13, 2022

    @hepcat72
    Author

    Yet, if I go back into the snakemake-tutorial environment, I get the old version again...

    $ conda activate snakemake-tutorial
    $ snakemake --version
    6.15.5
    
  6. hepcat72 commented on Dec 13, 2022

    @hepcat72
    Author

    I got the tutorial environment to work by doing:

    mamba install 'tabulate=0.8.10'
    
  7. dariober commented on Dec 14, 2022

    @dariober
    Contributor
    AttributeError: 'str' object has no attribute 'name'
    

    This is an unfortunate incompatibility between the recent tabulate >= 0.9 and older versions of snakemake ( <= 7.15.1). It has been reported in a few places like https://stackoverflow.com/questions/74226320/snakemake-tutorial-error-attributeerror-str-object-has-no-attribute-name and #1899

    Instead of downgrading tabulate, it's probably better to upgrade snakemake to the latest version instead.

    Besides, it appears that the tutorial version currently quoted in the docs 5.24.1 is a bit old. At the moment there is 7.4.2.

  8. added a commit that references this issue on Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions