I had to downgrade Werkzeug and Flask to avoid this error. When Flask-SocketIO is involved, you may need to stick with older versions to avoid incompatibility issues with newer versions of Flask.
The combination that works for me is:
Flask-SocketIO==4.3.1
python-engineio==3.13.2
python-socketio==4.6.0
Flask==2.0.3
Werkzeug==2.0.3
Answer from Joel Oduro-Afriyie on Stack OverflowI had to downgrade Werkzeug and Flask to avoid this error. When Flask-SocketIO is involved, you may need to stick with older versions to avoid incompatibility issues with newer versions of Flask.
The combination that works for me is:
Flask-SocketIO==4.3.1
python-engineio==3.13.2
python-socketio==4.6.0
Flask==2.0.3
Werkzeug==2.0.3
This error has been addressed, so you are very likely using an old version of Flask-SocketIO. Once you upgrade the error should go away.
Based on a quick glance through the tutorial, it looks like it might be a package version compatibility issue.
Have you tried upgrading Flask and Werkzeug to the latest versions?
Maybe try:
pip install Flask Werkzeug -U
It's version incompatibility that's causing the issue. A clean uninstall followed by a fresh install should fix the issue.
pip uninstall Flask Werkzeug
pip install Flask Werkzeug