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

'eventlet' invalid or not found #4

Open
thomasmattner opened this issue Aug 13, 2022 · 3 comments
Open

'eventlet' invalid or not found #4

thomasmattner opened this issue Aug 13, 2022 · 3 comments

Comments

@thomasmattner
Copy link

I am trying to run OvenSpace on Ubuntu with Python3.10 without success. Still getting:
Error: class uri 'eventlet' invalid or not found
I already tried several version of enventlet from 0.28.0 up to 33.1 without success.

Error: class uri 'eventlet' invalid or not found

[Traceback (most recent call last):
  File "/home/anubis/OvenSpace/venv/lib/python3.10/site-packages/gunicorn/util.py", line 99, in load_class
    mod = importlib.import_module('.'.join(components))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/anubis/OvenSpace/venv/lib/python3.10/site-packages/gunicorn/workers/geventlet.py", line 10, in <module>
    import eventlet
  File "/home/anubis/OvenSpace/venv/lib/python3.10/site-packages/eventlet/__init__.py", line 17, in <module>
    from eventlet import convenience
  File "/home/anubis/OvenSpace/venv/lib/python3.10/site-packages/eventlet/convenience.py", line 7, in <module>
    from eventlet.green import socket
  File "/home/anubis/OvenSpace/venv/lib/python3.10/site-packages/eventlet/green/socket.py", line 21, in <module>
    from eventlet.support import greendns
  File "/home/anubis/OvenSpace/venv/lib/python3.10/site-packages/eventlet/support/greendns.py", line 66, in <module>
    setattr(dns, pkg, import_patched('dns.' + pkg))
  File "/home/anubis/OvenSpace/venv/lib/python3.10/site-packages/eventlet/support/greendns.py", line 61, in import_patched
    return patcher.import_patched(module_name, **modules)
  File "/home/anubis/OvenSpace/venv/lib/python3.10/site-packages/eventlet/patcher.py", line 132, in import_patched
    return inject(
  File "/home/anubis/OvenSpace/venv/lib/python3.10/site-packages/eventlet/patcher.py", line 109, in inject
    module = __import__(module_name, {}, {}, module_name.split('.')[:-1])
  File "/home/anubis/OvenSpace/venv/lib/python3.10/site-packages/dns/namedict.py", line 35, in <module>
    class NameDict(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
]
@Quisi
Copy link

Quisi commented Aug 19, 2022

Same Error over here, but different stacktrace: python3.8

$ sudo pip install eventlet
Requirement already satisfied: eventlet in /usr/local/lib/python3.8/dist-packages (0.31.1)
Requirement already satisfied: greenlet>=0.3 in /usr/local/lib/python3.8/dist-packages (from eventlet) (1.1.1)
Requirement already satisfied: dnspython<2.0.0,>=1.15.0 in /usr/lib/python3/dist-packages (from eventlet) (1.16.0)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python3.8/dist-packages (from eventlet) (1.16.0)

and

$ sudo ./run.sh

Error: class uri 'eventlet' invalid or not found:

[Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/gunicorn/util.py", line 99, in load_class
    mod = importlib.import_module('.'.join(components))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.8/dist-packages/gunicorn/workers/geventlet.py", line 20, in <module>
    from eventlet.wsgi import ALREADY_HANDLED as EVENTLET_ALREADY_HANDLED
ImportError: cannot import name 'ALREADY_HANDLED' from 'eventlet.wsgi' (/usr/local/lib/python3.8/dist-packages/eventlet/wsgi.py)
]

@thomasmattner
Copy link
Author

Meanwhile I was successful with Python3.8 + enventlet 0.30.2

@Quisi
Copy link

Quisi commented Aug 19, 2022

Yes I did a little research:
[https://github.com/benoitc/gunicorn/pull/2581]

It's recommended to use eventlet>=0.31.0 if one uses websockets, because older versions are vulnerable to DoS attack. GHSA-9p9m-jm8w-94p2

but with pip uninstall eventlet and pip install eventlet==0.30.2

it now seems to work

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

2 participants