-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
Fix: v0.91.0 of fastapi Cannot add middleware after an application ha… #7717
Conversation
Justed wanted to add, reverting fastapi to 'fastapi<0.91.0' works. |
if youre in windows you'll get this error if you run webui.bat |
I did what you said and it still won't go through with the following error at the end. To create a public link, set |
Colab is still having problems with this error, I just got this, at the very end of the startup:
Update: it seems that modifying the txt is not enough, I had to run the following command on Colab. Wouldn't setting requirements_versions.txt work? |
Make sure youre launching with python 3.10.6, if you arent, delete repo and clone again. revert fastapi to 0.90. |
Dreambooth is still broken with fastapi=0.90.1 ####################################################################################################### Python revision: 3.10.9 (main, Jan 11 2023, 15:21:40) [GCC 11.2.0] Checking Dreambooth requirements... ####################################################################################################### ValueError: File cannot be fetched: /content/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser/javascript/images_history.js. All files must contained within the Gradio python app working directory, or be a temp file created by the Gradio python app. |
On Colab, this extra code solved the startup problems, which must be started separately before running:
|
I resolved this by "simply" cutting out these lines from webui.py:
Not that I have any idea what I'm doing, but it's the solution I would have wanted, so use at your own risk. I've had no further problems so far. |
@robertalanbevan the note right above what you removed says exactly what it's doing, so probably it should stay there if you can. I just resolved this with the suggestion above to install fastapi==0.90.1 I'd try that, just in case what you did will open the door to some attacker via some addon that you've added to the system. The note above what you deleted mentioned: oh and @AUTOMATIC1111 since you already put there a requirements_versions.txt file but it doesn't have the fastapi, I suggest maybe you add the fastapi==0.90.1 to it and it'll help a lot of people. Thanks for all of your awesome work :) |
This still seems to be an ongoing issue, just did a fresh install, fastapi is set to 0.90.1 and still get the following errors: ERROR: Exception in ASGI application |
thsi worked for me..thanks |
…s started
fix #7714
v0.91.0 of fastapi Cannot add middleware after an application has started
https://github.com/tiangolo/fastapi/releases/tag/0.91.0