RodneyLeeBrands / UnifiSnipeSync

12 stars 3 forks source link

AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'? #7

Open kMikaZu opened 1 week ago

kMikaZu commented 1 week ago

When I run the main.py script, it eventually runs the ratelimiter.py script but returns the following error:

Traceback (most recent call last):
  File ".../unifi2snipe/build/Mirto Unifi2snipe Sync Manually.app/Contents/Resources/main.py", line 12, in <module>
    from snipe import Snipe
  File ".../unifi2snipe/build/Mirto Unifi2snipe Sync Manually.app/Contents/Resources/snipe.py", line 3, in <module>
    from ratelimiter import RateLimiter
  File ".../unifi2snipe/build/venv/lib/python3.13/site-packages/ratelimiter.py", line 36, in <module>
    class RateLimiter(object):
    ...<94 lines>...
            return self.calls[-1] - self.calls[0]
  File ".../unifi2snipe/build/venv/lib/python3.13/site-packages/ratelimiter.py", line 127, in RateLimiter
    __aexit__ = asyncio.coroutine(__exit__)
                ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?

From what I found, Generator-bases Coroutines are deprecated since Python 3.11. See this info and this thread.

kMikaZu commented 1 week ago

Looks like the ratelimiter project is EOL... The developer now recommends rush.