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

Problem with install/dependencies of snakemake #1899

Closed
Fred-07 opened this issue Oct 8, 2022 · 5 comments
Closed

Problem with install/dependencies of snakemake #1899

Fred-07 opened this issue Oct 8, 2022 · 5 comments

Comments

@Fred-07
Copy link

Fred-07 commented Oct 8, 2022

After standard installation method from the "Snakemake tutorial", Snakemake can not be executed.
Running the basic worflow (https://snakemake.readthedocs.io/en/stable/tutorial/basics.html) reports:

Building DAG of jobs...
Traceback (most recent call last):
  File "/data/progs/Mamba/packages_dirs/snakemake-mini/lib/python3.10/site-packages/snakemake/__init__.py", line 733, in snakemake
    success = workflow.execute(
  File "/data/progs/Mamba/packages_dirs/snakemake-mini/lib/python3.10/site-packages/snakemake/workflow.py", line 1037, in execute
    logger.run_info("\n".join(dag.stats()))
  File "/data/progs/Mamba/packages_dirs/snakemake-mini/lib/python3.10/site-packages/snakemake/dag.py", line 2415, in stats
    yield tabulate(rows, headers="keys")
  File "/data/progs/Mamba/packages_dirs/snakemake-mini/lib/python3.10/site-packages/tabulate/__init__.py", line 2048, in tabulate
    list_of_lists, headers = _normalize_tabular_data(
  File "/data/progs/Mamba/packages_dirs/snakemake-mini/lib/python3.10/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 "/data/progs/Mamba/packages_dirs/snakemake-mini/lib/python3.10/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 "/data/progs/Mamba/packages_dirs/snakemake-mini/lib/python3.10/site-packages/tabulate/__init__.py", line 107, in _is_separating_line
    (len(row) >= 1 and row[0] == SEPARATING_LINE)
  File "/data/progs/Mamba/packages_dirs/snakemake-mini/lib/python3.10/site-packages/snakemake/rules.py", line 1222, in __eq__
    return self.name == other.name and self.output == other.output
AttributeError: 'str' object has no attribute 'name'

I tried on 2 different machines.
I tried with an older version of snakemake (7.8.5) and with Python 3.10 and 3.9

It would be useful to have a Conda environment file (from conda export) included with each snakemake release. It would help to identify problematic versions of dependencies if any.

@DrYak
Copy link
Contributor

DrYak commented Oct 8, 2022

I don't know if this is going to help:

  • I did update one mamba installation of Snakemake yesterday to 7.15.1 and it works.
  • I update another mamba installation of Snakemake today and it breaks as above.
    So the source lies in the differences between the two.

If I update --dry-run the still working one, this are the dependencies package update that have change in between the time frame:

 - azure-core            1.25.1  pyhd8ed1ab_0  conda-forge                 
  + azure-core            1.26.0  pyhd8ed1ab_0  conda-forge/noarch      87kB
  - boto3                1.24.86  pyhd8ed1ab_0  conda-forge                 
  + boto3                1.24.89  pyhd8ed1ab_0  conda-forge/noarch      74kB
  - botocore             1.27.86  pyhd8ed1ab_0  conda-forge                 
  + botocore             1.27.89  pyhd8ed1ab_0  conda-forge/noarch       6MB
  - gitpython             3.1.27  pyhd8ed1ab_0  conda-forge                 
  + gitpython             3.1.28  pyhd8ed1ab_0  conda-forge/noarch     127kB
  - google-api-core       2.10.1  pyhd8ed1ab_0  conda-forge                 
  + google-api-core       2.10.2  pyhd8ed1ab_0  conda-forge/noarch      73kB
  - importlib_resources    5.9.0  pyhd8ed1ab_0  conda-forge                 
  + importlib_resources   5.10.0  pyhd8ed1ab_0  conda-forge/noarch      30kB
  - tabulate              0.8.10  pyhd8ed1ab_0  conda-forge                 
  + tabulate               0.9.0  pyhd8ed1ab_1  conda-forge/noarch      36kB
  - typing-extensions      4.3.0  hd8ed1ab_0    conda-forge                 
  + typing-extensions      4.4.0  hd8ed1ab_0    conda-forge/noarch       9kB
  - typing_extensions      4.3.0  pyha770c72_0  conda-forge                 
  + typing_extensions      4.4.0  pyha770c72_0  conda-forge/noarch      30kB

Could it be the shift from tabulet 0.8 to 0.9?
(It's in the backtrace above).

@DrYak
Copy link
Contributor

DrYak commented Oct 8, 2022

YES, CONFIRMED : it is an incompatibility of dependencies.

Downgrading tabluate fixes the problem:

mamba install 'tabulate=0.8.10'

DrYak added a commit to bioconda/bioconda-recipes that referenced this issue Oct 8, 2022
See details in [snakemake issue 1899](snakemake/snakemake#1899):

tabulate 0.9 reproducibly crashes snakemake with an error:
```text
AttributeError: 'str' object has no attribute 'name'
```
@DrYak
Copy link
Contributor

DrYak commented Oct 8, 2022

PR with fix

@Fred-07
Copy link
Author

Fred-07 commented Oct 8, 2022

Thanks for solving this issue so quickly!

@DrYak
Copy link
Contributor

DrYak commented Oct 9, 2022

Johaness even released a new 7.15.2 that's compatible with this latest tabulate. Yay!
🎊

jnnr added a commit to jnnr/sector-coupled-euro-calliope that referenced this issue Aug 29, 2023
lecriste added a commit to BlueBrain/bbp-atlas-pipeline that referenced this issue Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants