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 Overflow
🌐
GitHub
github.com › miguelgrinberg › Flask-SocketIO › issues › 1809
ImportError: cannot import name 'run_with_reloader' from 'werkzeug.serving' · Issue #1809 · miguelgrinberg/Flask-SocketIO
March 30, 2022 - Describe the bug I am seeing the following issue upon importing flask_socketio into my app: File "/home/.../venv/lib/python3.7/site-packages/flask_socketio/__init__.py", line 24, in from werkzeug.serving import run_with_reloader...
Author   miguelgrinberg
🌐
GitHub
github.com › miguelgrinberg › Flask-SocketIO › issues › 1812
Flask socketio breaks with new version of Werkzeug (2.1.*) · Issue #1812 · miguelgrinberg/Flask-SocketIO
April 7, 2022 - from flask_socketio import disconnect File "/usr/local/lib/python3.8/site-packages/flask_socketio/__init__.py", line 24, in <module> from werkzeug.serving import run_with_reloader ImportError: cannot import name 'run_with_reloader' from 'werkzeug.serving' (/usr/local/lib/python3.8/site-packages/werkzeug/serving.py)
Author   miguelgrinberg
🌐
Google Groups
groups.google.com › g › linux.debian.bugs.dist › c › btNYTxrm37M
Bug#1023568: onionshare: autopkgtest regression with flask 2.2.2
File "/usr/lib/python3/dist-packages/flask_socketio/__init__.py", line 24, in <module> from werkzeug.serving import run_with_reloader ImportError: cannot import name 'run_with_reloader' from 'werkzeug.serving' (/usr/lib/python3/dist-packages/werkzeug/serving.py) The full log (amd64) is reachable under https://ci.debian.net/data/autopkgtest/unstable/amd64/o/onionshare/27759203/log.gz The full list of packages that fail with flask from experimental can be found here.
🌐
Beautiful Soup
tedboy.github.io › flask › _modules › werkzeug › serving.html
werkzeug.serving — Flask API
""" if threaded and processes > 1: raise ValueError("cannot have a multithreaded and " "multi process server.") elif threaded: return ThreadedWSGIServer(host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd) elif processes > 1: return ForkingWSGIServer(host, port, app, processes, request_handler, passthrough_errors, ssl_context, fd=fd) else: return BaseWSGIServer(host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd) def is_running_from_reloader(): """Checks if the application is running from within the Werkzeug reloader subprocess.
🌐
GitHub
github.com › bkbilly › AlarmPI › issues › 24
cannot import name 'run_with_reloader' from 'werkzeug.serving', rpi os bullseye 32 bit · Issue #24 · bkbilly/AlarmPI
September 25, 2022 - OS Version Distributor ID: Raspbian Description: Raspbian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye AlarmPI version 8106769 *Latest, just installed Error Logs No such file instead, I will show the output of `sudo systemctl s...
Author   bkbilly
🌐
GitHub
github.com › pallets › werkzeug › pull › 1416
reloader uses "-m" instead of file if possible by davidism · Pull Request #1416 · pallets/werkzeug
Also removed a comment saying not to use relative imports in werkzeug.serving (8b2b621), now that we reload with -m relative imports would work correctly.
Author   pallets
Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › tagged › werkzeug
Newest 'werkzeug' Questions - Page 5 - Stack Overflow
I am getting the following error when I try to run the backend of my web application: ImportError: cannot import name 'run_with_reloader' from 'werkzeug.serving'. It is coming from within the \lib\...
🌐
DEV Community
dev.to › behainguyen › python-docker-image-build-the-werkzeug-problem--3j0n
Python: Docker image build -- “the Werkzeug” problem 🤖! - DEV Community
July 25, 2022 - I've experienced Docker image build installed a different version of the Werkzeug dependency package...
🌐
Werkzeug
werkzeug.palletsprojects.com › serving
Serving WSGI Applications — Werkzeug Documentation (3.1.x)
May 11, 2021 - Check if the server is running as a subprocess within the Werkzeug reloader.
🌐
Stack Overflow
stackoverflow.com › questions › tagged › werkzeug
Recently Active 'werkzeug' Questions - Page 2 - Stack Overflow
However, on centos server I cannot get an output to the log file when I restart the Gunicorn service.... ... Since few days I have an issue with reloading when debugging flask apps. Usually, when saving changes the debugger restarts and I could work on my app. Now it still saves and reloads, but throws an ... ... I am building a webapp using Flask. I imported the flask-login library to handle user login. But it shows an ImportError.
🌐
GitHub
github.com › django-extensions › django-extensions › issues › 1475
ImportError when Werkzeug is installed · Issue #1475 · django-extensions/django-extensions
May 2, 2020 - Running the following code with the latest Wekzeug installed now gives an ImportError (I believe this should now be from werkzeug.debug import DebuggedApplication. django-extensions/django_extensions/management/commands/runserver_plus.py...
Author   django-extensions
🌐
GitHub
github.com › pallets › werkzeug › issues › 1600
Reloader fails on setuptools script installed as an egg · Issue #1600 · pallets/werkzeug
July 5, 2019 - We use werkzeug as router component of trytond. Everything worked on previous versions but since 0.15 (concretly after #1416 was merged), running the server from an package script and activating the reloader causes the following error: T...
Author   pallets
🌐
Stack Overflow
stackoverflow.com › questions › tagged › werkzeug
Frequent 'werkzeug' Questions - Page 2 - Stack Overflow
The Problem When I run python manage.py runserver I get the error ImportError: cannot import name AdminMediaHandler.
🌐
PythonAnywhere
pythonanywhere.com › forums › topic › 34937
mysite stops working after I tried to update flask to 2.2 version : Forums : PythonAnywhere
August 2, 2024 - Make sure you successfully installed the package for the same Python version / environment you run your site with (looks like it's Python 3.10, and you don't use a virtual env) and you reloaded the web app afterwards. pafk | 3969 posts | PythonAnywhere staff | Aug.
🌐
Plotly
community.plotly.com › dash python
Dash / Werkzeug: import error when trying to run Dash/Plotly, originating from Werkzeug - Dash Python - Plotly Community Forum
September 29, 2020 - 0 I recently installed dash and I’m trying to run a basic dash code. However, I’m getting a specific import error which is stemming from Werkzeug (I don’t even know what werkzeug is). I’ve tried downgrading werkzeug to …