RuntimeError: Cannot add middleware after an application has started #7749
Replies: 8 comments 20 replies
-
#7714 known issue. |
Beta Was this translation helpful? Give feedback.
-
Is someone could help me to installstble diffusion on Windows 10. Step by step to fix the error ? I took the 7Giga version. I never had ".bat" writed but i undestsand it's the command files. CLicking on it had no effect. I have this like other people : To create a public link, set |
Beta Was this translation helpful? Give feedback.
-
Hi ClashSAN, |
Beta Was this translation helpful? Give feedback.
-
Sometimes when I start the webui it upgrades fastapi to 0.94.0, which doesn't work. Why does the requirements_versions.txt file still install fastapi 0.94.0 if it is nonfunctional? |
Beta Was this translation helpful? Give feedback.
-
File "E:\AI_Anime_SD2\webui\webui.py", line 224, in webui I cannot pass this line command even with all the changes you mention. |
Beta Was this translation helpful? Give feedback.
-
If I just try to start again, it works most of the time, looks like its a startup race-condition. It seems to work more often if I keep the console focussed during startup. Once it has started, its fine. |
Beta Was this translation helpful? Give feedback.
-
After entering "venv\scripts\activate" I get the following error:
Then I ran and followed the instructions for Import-Modulevenv but this results in another attempt to run the webui that fails with "RuntimeError: Cannot add middleware after an application has started" again. Then if I go ahead and enter "pip uninstall fastapi" anyway, I get "WARNING: Skipping fastapi as it is not installed." Then I entered "pip install fastapi==0.90.1" and it appears to install, but when I attempt run again, I again get "RuntimeError: Cannot add middleware after an application has started" |
Beta Was this translation helpful? Give feedback.
-
same issue "RuntimeError: Cannot add middleware after an application has started". almost a year later and still no answer. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
While installing stable diffusion I encountered some errors and after copying and pasting the http://127.0.0.1:7860 link on the browser it didn't open.
Hrere is the error:
Traceback (most recent call last):
File "C:\Users\chiak\Documents\stable-diffusion\stable-diffusion-webui\launch.py", line 361, in
start()
File "C:\Users\chiak\Documents\stable-diffusion\stable-diffusion-webui\launch.py", line 356, in start
webui.webui()
File "C:\Users\chiak\Documents\stable-diffusion\stable-diffusion-webui\webui.py", line 232, in webui
app.add_middleware(GZipMiddleware, minimum_size=1000)
File "C:\Users\chiak\Documents\stable-diffusion\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 135, in add_middleware
raise RuntimeError("Cannot add middleware after an application has started")
RuntimeError: Cannot add middleware after an application has started
Please any help I will really appreciate it. thanks
*I installed it on my drive C:*
Beta Was this translation helpful? Give feedback.
All reactions