1

I followed the following code to install snakemake on my linux machine :

conda activate base
mamba create -c conda-forge -c bioconda -n snakemake snakemake
conda activate snakemake

Everything was fine, but when I try to run the following code :

snakemake -s Snakemake_job -j n

I get this error :

Building DAG of jobs...
Traceback (most recent call last):
  File "/home/debian/.conda/envs/snakemake/lib/python3.11/site-packages/snakemake/__init__.py", line 747, in snakemake
    success = workflow.execute(
              ^^^^^^^^^^^^^^^^^
  File "/home/debian/.conda/envs/snakemake/lib/python3.11/site-packages/snakemake/workflow.py", line 949, in execute
    self.scheduler = JobScheduler(
                     ^^^^^^^^^^^^^
  File "/home/debian/.conda/envs/snakemake/lib/python3.11/site-packages/snakemake/scheduler.py", line 109, in __init__
    from ratelimiter import RateLimiter
  File "/home/debian/.conda/envs/snakemake/lib/python3.11/site-packages/ratelimiter.py", line 36, in <module>
    class RateLimiter(object):
  File "/home/debian/.conda/envs/snakemake/lib/python3.11/site-packages/ratelimiter.py", line 127, in RateLimiter
    __aexit__ = asyncio.coroutine(__exit__)
                ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'

Does someone have an idea of what is going on? I tried to re-install snakemake, or to pip install asyncio without sucess...

1 Answer 1

2

Quoth the docs for asyncio.coroutine, emphasis mine:

Deprecated since version 3.8, will be removed in version 3.11: Use async def instead.

The ratelimiter dependency snakemake uses is evidently not compatible with Python 3.11.

That package has had an issue open about this for multiple years, and snakemake seems to be switching dependencies.

In other words, your choices are:

Sign up to request clarification or add additional context in comments.

2 Comments

Do you know what should I do then ?
Sure, I edited your options into the post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.