flask-socketio does not work on aws with eventlet installed flask-socketio does not work on aws with eventlet installed flask flask

flask-socketio does not work on aws with eventlet installed


This error:

[Fri Feb 16 17:45:47.269584 2018] [:error] [pid 4233]     import re[Fri Feb 16 17:45:47.269592 2018] [:error] [pid 4233]   File "/opt/python/run/venv/lib64/python3.6/re.py", line 142, in <module>[Fri Feb 16 17:45:47.269750 2018] [:error] [pid 4233]     class RegexFlag(enum.IntFlag):[Fri Feb 16 17:45:47.269762 2018] [:error] [pid 4233] AttributeError: module 'enum' has no attribute 'IntFlag'

is very likely unrelated to SocketIO. My guess is that your application has a module or package called enum that is shadowing the enum package from Python 3.6. Remove or rename your enum so that Python can see its own enum, and the error will go away.

Besides that, as Graham noted, you cannot use apache and mod_wsgi with websockets. You can consult the Flask-SocketIO documentation for the list of supported deployment configurations.


Sorry, I uploaded package created with old setuptools, which does not honor this syntax enum34;python_version<"3.4" in install_requirements.

Please try updating pip install -U eventlet, just released 0.22.1 that should fix this problem.

Relevant issue on Github (subscribe for news if 0.22.1 doesn't fix it): https://github.com/eventlet/eventlet/issues/463