stable-diffusion-webui
stable-diffusion-webui copied to clipboard
ERROR: Exception in ASGI application
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Just came across this, after some hours generating.
ERROR: Exception in ASGI application Traceback (most recent call last): File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 407, in run_asgi result = await app( # type: ignore[func-returns-value] File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in call return await self.app(scope, receive, send) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\fastapi\applications.py", line 270, in call await super().call(scope, receive, send) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 124, in call await self.middleware_stack(scope, receive, send) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 184, in call raise exc File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in call await self.app(scope, receive, _send) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 24, in call await responder(scope, receive, send) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 44, in call await self.app(scope, receive, self.send_with_gzip) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in call raise exc File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in call await self.app(scope, receive, sender) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in call raise e File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in call await self.app(scope, receive, send) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 706, in call await route.handle(scope, receive, send) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 276, in handle await self.app(scope, receive, send) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 66, in app response = await func(request) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 237, in app raw_response = await run_endpoint_function( File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 165, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\starlette\concurrency.py", line 41, in run_in_threadpool return await anyio.to_thread.run_sync(func, *args) File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "d:\WORK\conda_envs\automatic\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) File "D:\WORK\conda_envs\automatic\stable-diffusion-webui\modules\progress.py", line 73, in progressapi progress += 1 / shared.state.job_count * shared.state.sampling_step / shared.state.sampling_steps ZeroDivisionError: division by zero "
Steps to reproduce the problem
Unfortunately it looks random. Generated for hours until hit by it.
What should have happened?
No error.
Commit where the problem happens
52f6e94338f31c286361802b08ee5210b8244141
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Microsoft Edge
Command Line Arguments
--xformers --opt-channelslast
Additional information, context and logs
No response
I have updated today and i am getting this error too, but i get it just for acceding to the local URL in the web browser.
me too, also raise after launch the web page
following the other thread suggestion i disabled one not up to date extension and the error went away.
I followed that threat but I don't actually have that extension so i don't know what else it could be, i removed all other extensions and the problem was still there.
Hey weird question, do you have Save text information about generation parameters as chunks to png files
disabled?
I was troubleshooting another plugin that errored out in a similar fashion (with the ERROR: Exception in ASGI application
) and I fixed it by re-enabling that setting.
That plugin was attempting to scrape metadata from the generated .png and would return a null
(since I had that setting disabled) and crash the entire plugin.
Not sure if it applies to this exact problem (as your error is slightly different) but it might fix it for you.
@remghoost I have that option enabled.
To everyone claiming that disabling an extension fixes it, that is likely just because you restarted the server. In my experience, this happens after several days of keeping the A1111 server open.
My theory (but it's just a theory) is that the model is getting evicted from VRAM after a while. Restarting the server fixes it, but since I want to use it as a server via the API, it's impossible to make this restart automatically. Even as a workaround if the application could detect this failure and restart itself, that would be helpful.
I faced the same issue, and by trial and error found out (at least for me) the issue was with xformers. removing the --xformers argument disables xformers and the error went away.
Try it.
seems to be problem with latest update. Hopefully they fix this, cause else we won't be able to use xformers.
https://youtu.be/YuFFmcqlZiU?t=6 "why must there always be a problem!?"
I got this error from going to img2img tab and uploading a .png image.
i got it when trying to update extensions
Been getting this error for the last week or so. Havent been able to find the cause. It all still works, but just strange that theres an error. Seems to happen when refreshing the web page in browser.
I also have the same issue with my API running on Digital Ocean. I tested the endpoint locally and ran in to the same issue.
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 404, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\fastapi\applications.py", line 270, in call
await super().call(scope, receive, send)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\applications.py", line 124, in call
await self.middleware_stack(scope, receive, send)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\middleware\errors.py", line 184, in call
raise exc
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\middleware\errors.py", line 162, in call
await self.app(scope, receive, _send)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\middleware\cors.py", line 84, in call
await self.app(scope, receive, send)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\middleware\exceptions.py", line 75, in call
raise exc
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\middleware\exceptions.py", line 64, in call
await self.app(scope, receive, sender)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in call
raise e
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\routing.py", line 680, in call
await route.handle(scope, receive, send)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\routing.py", line 275, in handle
await self.app(scope, receive, send)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\routing.py", line 65, in app
response = await func(request)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\fastapi\routing.py", line 231, in app
raw_response = await run_endpoint_function(
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\fastapi\routing.py", line 162, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\starlette\concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\Users\hp\Documents\Our Documents\Personal Development\Projects\Personal Projects\Election-Campaign-Application-Phase2-Implementation.\app\main.py", line 82, in run_prediction
message = predict_sentiment()
File "C:\Users\hp\Documents\Our Documents\Personal Development\Projects\Personal Projects\Election-Campaign-Application-Phase2-Implementation.\app\main.py", line 45, in predict_sentiment
prediction = model.predict(ind_var, verbose=False)
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\engine\training.py", line 2407, in predict
raise ValueError(
ValueError: Unexpected result of predict_function
(Empty batch_outputs). Please use Model.compile(..., run_eagerly=True)
, or tf.config.run_functions_eagerly(True)
for more information of where went wrong, or file a issue/bug to tf.keras
.
I faced the same issue, and by trial and error found out (at least for me) the issue was with xformers. removing the --xformers argument disables xformers and the error went away.
Try it.
seems to be problem with latest update. Hopefully they fix this, cause else we won't be able to use xformers. fixed by this method.thank u .after i installed some plugins i encountered this issue.
I am getting this problem today, probably something to do with Cuda and Torch, I updated Cuda to 11.8 yesterday and I'm facing this.
I was running into this issue this evening, and tried removing xformers first, which wasn't it. I then disabled all of my extensions, and the issue went away. After testing each one-by-one, I discovered it was actually two of them causing it, both "multidiffusion-upscaler-for-automatic1111" and "stable-diffusion-webui-vectorstudio". Disabling those solved the issue for me.
I was running into this issue this evening, and tried removing xformers first, which wasn't it. I then disabled all of my extensions, and the issue went away. After testing each one-by-one, I discovered it was actually two of them causing it, both "multidiffusion-upscaler-for-automatic1111" and "stable-diffusion-webui-vectorstudio". Disabling those solved the issue for me.
Thanks for this. Disabling "stable-diffusion-webui-vectorstudio" fixed it for me as well.
it [00:00, ?it/s] 2023-07-25 13:31:03,153 - ControlNet - INFO - ControlNet v1.1.233 ControlNet preprocessor location: /home/sj/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads 2023-07-25 13:31:03,213 - ControlNet - INFO - ControlNet v1.1.233 Checkpoint 2.5D/rpg_V4.safetensors [e04b020012] not found; loading fallback v1-5-pruned-emaonly.safetensors [6ce0161689] Loading weights [6ce0161689] from /home/sj/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors Creating model from config: /home/sj/stable-diffusion-webui/configs/v1-inference.yaml LatentDiffusion: Running in eps-prediction mode Deforum ControlNet support: enabled ERROR: Exception in ASGI application UnicodeEncodeError: 'utf-8' codec can't encode characters in position 20-21: surrogates not allowed
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call return await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/applications.py", line 273, in call await super().call(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/applications.py", line 122, in call await self.middleware_stack(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call raise exc File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call await self.app(scope, receive, _send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in call await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call raise exc File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call await self.app(scope, receive, sender) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call raise e File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in call await route.handle(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app response = await func(request) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app raw_response = await run_endpoint_function( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 165, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool return await anyio.to_thread.run_sync(func, *args) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 251, in main return templates.TemplateResponse( File "/home/sj/stable-diffusion-webui/modules/ui_gradio_extensions.py", line 59, in template_response res = shared.GradioTemplateResponseOriginal(*args, **kwargs) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/templating.py", line 113, in TemplateResponse return _TemplateResponse( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/templating.py", line 39, in init content = template.render(context) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/templates/frontend/index.html", line 41, in top-level template code File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 83, in toorjson ORJSONResponse._render_str(value) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 78, in _render_str return ORJSONResponse._render(content).decode("utf-8") File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 67, in _render return orjson.dumps( TypeError: str is not valid UTF-8: surrogates not allowed preload_extensions_git_metadata for 21 extensions took 0.58s DiffusionWrapper has 859.52 M params. ERROR: Exception in ASGI application UnicodeEncodeError: 'utf-8' codec can't encode characters in position 20-21: surrogates not allowed
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call return await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/applications.py", line 273, in call await super().call(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/applications.py", line 122, in call await self.middleware_stack(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call raise exc File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call await self.app(scope, receive, _send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in call await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call raise exc File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call await self.app(scope, receive, sender) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call raise e File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in call await route.handle(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app response = await func(request) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app raw_response = await run_endpoint_function( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 165, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool return await anyio.to_thread.run_sync(func, *args) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 251, in main return templates.TemplateResponse( File "/home/sj/stable-diffusion-webui/modules/ui_gradio_extensions.py", line 59, in template_response res = shared.GradioTemplateResponseOriginal(*args, **kwargs) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/templating.py", line 113, in TemplateResponse return _TemplateResponse( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/templating.py", line 39, in init content = template.render(context) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/templates/frontend/index.html", line 41, in top-level template code File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 83, in toorjson ORJSONResponse._render_str(value) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 78, in _render_str return ORJSONResponse._render(content).decode("utf-8") File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 67, in _render return orjson.dumps( TypeError: str is not valid UTF-8: surrogates not allowed ERROR: Exception in ASGI application UnicodeEncodeError: 'utf-8' codec can't encode characters in position 20-21: surrogates not allowed
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call return await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/applications.py", line 273, in call await super().call(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/applications.py", line 122, in call await self.middleware_stack(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call raise exc File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call await self.app(scope, receive, _send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in call await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call raise exc File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call await self.app(scope, receive, sender) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call raise e File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in call await route.handle(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app response = await func(request) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app raw_response = await run_endpoint_function( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 165, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool return await anyio.to_thread.run_sync(func, *args) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 251, in main return templates.TemplateResponse( File "/home/sj/stable-diffusion-webui/modules/ui_gradio_extensions.py", line 59, in template_response res = shared.GradioTemplateResponseOriginal(*args, **kwargs) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/templating.py", line 113, in TemplateResponse return _TemplateResponse( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/templating.py", line 39, in init content = template.render(context) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/templates/frontend/index.html", line 41, in top-level template code File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 83, in toorjson ORJSONResponse._render_str(value) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 78, in _render_str return ORJSONResponse._render(content).decode("utf-8") File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 67, in _render return orjson.dumps( TypeError: str is not valid UTF-8: surrogates not allowed Applying attention optimization: xformers... done. Textual inversion embeddings loaded(0): Model loaded in 2.9s (load weights from disk: 0.6s, create model: 1.4s, apply weights to model: 0.4s, apply half(): 0.3s). ERROR: Exception in ASGI application UnicodeEncodeError: 'utf-8' codec can't encode characters in position 20-21: surrogates not allowed
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call return await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/applications.py", line 273, in call await super().call(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/applications.py", line 122, in call await self.middleware_stack(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call raise exc File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call await self.app(scope, receive, _send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in call await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call raise exc File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call await self.app(scope, receive, sender) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call raise e File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in call await route.handle(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle await self.app(scope, receive, send) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app response = await func(request) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app raw_response = await run_endpoint_function( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 165, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool return await anyio.to_thread.run_sync(func, *args) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, *args) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 251, in main return templates.TemplateResponse( File "/home/sj/stable-diffusion-webui/modules/ui_gradio_extensions.py", line 59, in template_response res = shared.GradioTemplateResponseOriginal(*args, **kwargs) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/templating.py", line 113, in TemplateResponse return _TemplateResponse( File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/templating.py", line 39, in init content = template.render(context) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/templates/frontend/index.html", line 41, in top-level template code File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 83, in toorjson ORJSONResponse._render_str(value) File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 78, in _render_str return ORJSONResponse._render(content).decode("utf-8") File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 67, in _render return orjson.dumps( TypeError: str is not valid UTF-8: surrogates not allowed ERROR: Exception in ASGI application UnicodeEncodeError: 'utf-8' codec can't encode characters in position 20-21: surrogates not allowed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/applications.py", line 273, in call
await super().call(scope, receive, send)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/cors.py", line 84, in call
await self.app(scope, receive, send)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 237, in app
raw_response = await run_endpoint_function(
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/fastapi/routing.py", line 165, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 251, in main
return templates.TemplateResponse(
File "/home/sj/stable-diffusion-webui/modules/ui_gradio_extensions.py", line 59, in template_response
res = shared.GradioTemplateResponseOriginal(*args, **kwargs)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/templating.py", line 113, in TemplateResponse
return _TemplateResponse(
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/starlette/templating.py", line 39, in init
content = template.render(context)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/templates/frontend/index.html", line 41, in top-level template code
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 83, in toorjson
ORJSONResponse._render_str(value)
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 78, in _render_str
return ORJSONResponse._render(content).decode("utf-8")
File "/home/sj/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 67, in _render
return orjson.dumps(
TypeError: str is not valid UTF-8: surrogates not allowed
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/sj/stable-diffusion-webui/launch.py:38 in
This problem is caused by the module /stable-diffusion-webui/models that loads the model with a Chinese mark, but it will not be reflected in the win system. This problem will be encountered in ubuntu. How to solve this problem, you need to delete the model marked in Chinese, or change the name.
I've this error after an hour oob is active and i don't use xformers
I also have the issue with my API running . I tested the endpoint locally and ran in to the same issue.
ERROR: Exception in ASGI application Traceback (most recent call last): File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 426, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\fastapi\applications.py", line 289, in call await super().call(scope, receive, send) File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\starlette\applications.py", line 122, in call await self.middleware_stack(scope, receive, send) File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\starlette\middleware\errors.py", line 184, in call raise exc File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\starlette\middleware\errors.py", line 162, in call await self.app(scope, receive, _send) File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\starlette\middleware\exceptions.py", line 79, in call raise exc File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\starlette\middleware\exceptions.py", line 68, in call await self.app(scope, receive, sender) File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 20, in call raise e File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\fastapi\middleware\asyncexitstack.py", line 17, in call await self.app(scope, receive, send) File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\starlette\routing.py", line 718, in call await route.handle(scope, receive, send) File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\starlette\routing.py", line 276, in handle await self.app(scope, receive, send) File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\starlette\routing.py", line 66, in app response = await func(request) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\fastapi\routing.py", line 273, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\fastapi\routing.py", line 190, in run_endpoint_function return await dependant.call(**values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\app.py", line 111, in query llm = GPT4All(model=model_path, n_ctx=model_n_ctx, backend='gptj', callbacks=callbacks, verbose=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "pydantic\main.py", line 339, in pydantic.main.BaseModel.init File "pydantic\main.py", line 1102, in pydantic.main.validate_model File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\langchain\llms\gpt4all.py", line 169, in validate_environment values["client"] = GPT4AllModel( ^^^^^^^^^^^^^ File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\pygpt4all\models\gpt4all_j.py", line 47, in init super(GPT4All_J, self).init(model_path=model_path, File "C:\Users\Administrator\OneDrive\Desktop\privateGpt\venv\Lib\site-packages\pygptj\model.py", line 58, in init raise Exception(f"File {model_path} not found!") Exception: File models\ggml-gpt4all-j-v1.3-groovy.bin not found!
when i use chatglm2-6b,this error will response but don‘t influence
https://www.youtube.com/watch?v=jyWo7dSpvL8 This video solve my problem.
TLDR: The problem for me was miaoshouai-assistant. Removed it, deleted venv folder. Works now.
Longer version: I had tried everything I found on this page and a few others with no luck. I can't say whether or not anything on this page helped my solution mentioned here work better or if there was no effect. All I know is the fixes didn't work until I removed the miaoshouai-assistant extension. I really liked that extension and hope it's updated to working again for me.
Steps I performed to get my stable diffusion working again:
- Delete the venv folder
- Delete the Miaoshouai-assistant folder in /extensions
- Run webui-user.bat
The venv folder was rebuilt and started working. The reason I take extra care to point this out is because I tried running SD with no extensions in the /extensions folder and still got the same error. I can only guess that miaoshouai-assistant puts something in the folder that causes the issue, or requires a dependency that causes the issue.
Hope this helps ♥
Just want to throw my anecdote into the mix. I've encountered this issue twice, and in both cases, the "/info" endpoint starts throwing 500 errors, causing all of the other functionality in a1111 to fail. If I delete the venv folder and restart, the problem goes away for awhile.
In both cases when I encountered this issue, I was using some PNG Info functionality, and I do have Miaoshou-assistant installed and enabled.
UPDATE: I discovered that I had an older version of Miaoshou-assistant installed, which was apparently installing an older version of gradio, which in turn installed an older version of gradio_client, which caused issues such as:
AttributeError: module 'gradio_client.utils' has no attribute 'SKIP_COMPONENTS'. Did you mean: 'STATE_COMPONENT'?
So the weird behavior was this: when I created a new venv from scratch, it would first install version 0.5.0 of gradio_client, but then I would see the following message in the console:
Installing Miaoshou assistant requirement: gradio_client==0.2.7
Upon seeing this message, I would execute:
cat venv/python3.10/Lib/site-packages/gradio_client/version.txt
0.5.0
Which suggests that gradio_client 0.2.7 WAS NOT, in fact, installed when first running A1111, and everything would work properly. However, upon restarting A1111, and seeing the same message about gradio_client 0.2.7, re-running that same command revealed that gradio_client 0.2.7 WAS installed:
cat venv/python3.10/Lib/site-packages/gradio_client/version.txt
0.2.7
I don't know how to make extensions each run their own versions of a library, instead of changing the global package used by all the other modules in the venv, so I tried upgrading Miaoshou-assistant:
cd extensions/miaoshouai-assistant
git checkout -- .
git pull
Upon restarting A1111, miaoshouai-assistant is now using gradio_client 0.5.0:
Installing Miaoshou assistant requirement: gradio_client==0.5.0
cat venv/python3.10/Lib/site-packages/gradio_client/version.txt
0.5.0
All of my A1111 became resolved after this upgrade.
I don't know if this helps but I'm no longer getting the Error after removing the FaceSwapLab extension from latest version of A1111
[+] Running 1/0
✔ Container movies Created 0.0s
Attaching to movies
movies | INFO: Started server process [1]
movies | INFO: Waiting for application startup.
movies | INFO: Application startup complete.
movies | INFO: Uvicorn running on http://0.0.0.0:8008 (Press CTRL+C to quit)
movies | INFO: 172.19.0.1:46956 - "GET /docs HTTP/1.1" 200 OK
movies | INFO: 172.19.0.1:46956 - "GET /openapi.json HTTP/1.1" 200 OK
movies | INFO: 172.19.0.1:43058 - "GET /movies HTTP/1.1" 200 OK
movies | INFO: 172.19.0.1:34900 - "POST /movies HTTP/1.1" 500 Internal Server Error
movies | ERROR: Exception in ASGI application
movies | Traceback (most recent call last):
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context
movies | self.dialect.do_execute(
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
movies | cursor.execute(statement, parameters)
movies | psycopg2.errors.UndefinedColumn: column movies_table.director_id does not exist
movies | LINE 1: ...able.popularity_99 AS movies_table_popularity_99, movies_tab...
movies | ^
movies | HINT: Perhaps you meant to reference the column "movies_table.director".
movies |
movies |
movies | The above exception was the direct cause of the following exception:
movies |
movies | Traceback (most recent call last):
movies | File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
movies | result = await app( # type: ignore[func-returns-value]
movies | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
movies | File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
movies | return await self.app(scope, receive, send)
movies | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
movies | File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 292, in call
movies | await super().call(scope, receive, send)
movies | File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in call
movies | await self.middleware_stack(scope, receive, send)
movies | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in call
movies | raise exc
movies | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in call
movies | await self.app(scope, receive, _send)
movies | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in call
movies | raise exc
movies | File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in call
movies | await self.app(scope, receive, sender)
movies | File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call
movies | raise e
movies | File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call
movies | await self.app(scope, receive, send)
movies | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in call
movies | await route.handle(scope, receive, send)
movies | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
movies | await self.app(scope, receive, send)
movies | File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
movies | response = await func(request)
movies | ^^^^^^^^^^^^^^^^^^^
movies | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 273, in app
movies | raw_response = await run_endpoint_function(
movies | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
movies | File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 190, in run_endpoint_function
movies | return await dependant.call(**values)
movies | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
movies | File "/movie_docker/main.py", line 187, in create_movies
movies | existing_movie = db.query(models.Movies).filter(models.Movies.name == movie_data.name).first()
movies | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 2819, in first
movies | return self.limit(1)._iter().first()
movies | ^^^^^^^^^^^^^^^^^^^^^
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/query.py", line 2903, in _iter
movies | result = self.session.execute(
movies | ^^^^^^^^^^^^^^^^^^^^^
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 1712, in execute
movies | result = conn._execute_20(statement, params or {}, execution_options)
movies | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1631, in _execute_20
movies | return meth(self, args_10style, kwargs_10style, execution_options)
movies |
movies | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/elements.py", line 332, in _execute_on_connection
movies | return connection._execute_clauseelement(
movies | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1498, in _execute_clauseelement
movies | ret = self._execute_context(
movies | ^^^^^^^^^^^^^^^^^^^^^^
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1862, in _execute_context
movies | self.handle_dbapi_exception(
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2043, in handle_dbapi_exception
movies | util.raise(
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 208, in raise
movies | raise exception
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context
movies | self.dialect.do_execute(
movies | File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
movies | cursor.execute(statement, parameters)
movies | sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column movies_table.director_id does not exist
movies | LINE 1: ...able.popularity_99 AS movies_table_popularity_99, movies_tab...
movies | ^
movies | HINT: Perhaps you meant to reference the column "movies_table.director".
movies |
movies | [SQL: SELECT movies_table.id AS movies_table_id, movies_table.popularity_99 AS movies_table_popularity_99, movies_table.director_id AS movies_table_director_id, movies_table.genre AS movies_table_genre, movies_table.imdb_score AS movies_table_imdb_score, movies_table.name AS movies_table_name
movies | FROM movies_table
movies | WHERE movies_table.name = %(name_1)s
movies | LIMIT %(param_1)s]
movies | [parameters: {'name_1': 'the wizard of oz', 'param_1': 1}]
movies | (Background on this error at: https://sqlalche.me/e/14/f405)
movies |
Im a bit late to the party but i am quite sure i know why the error occurs (one of multiple reason possibly>)
I was stupid and somehow managed to give pytorch's .PTH extension a default executable. Now these file are kind of just symlinks i think so that royally srewed my entire computer over.
That the reaspn why some SD webui extensions give errors. because the models they use are linked by as .PTH files instead of the full weight.
Now luckily we are developers and i totally didnt sspend an hour figuring this out.
in you're regedit you are able to change extension values back to undefined.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
as u can see i managed to first assign another weight as default. then i proceeded to bind it to .exe.
fix this by the enter the folder nameed as the extensions properties. clicking advanced and removing all the unwanted entries (in my case me 3 times 2 by accident)
hope thats reason (and possibly other weird py extensions)
It would be amazing if the error messages would say which extensions are causing the issues.
I have the same issue but idk how to resolve it.
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py", line 250, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\applications.py", line 273, in __call__
await super().__call__(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\errors.py", line 149, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\cors.py", line 76, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\gzip.py", line 26, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
raise exc
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
raise e
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 341, in handle
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 82, in app
await func(session)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\routing.py", line 289, in app
await dependant.call(**values)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\gradio\routes.py", line 604, in join_queue
session_info = await asyncio.wait_for(
File "C:\Users\PC2022\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 445, in wait_for
return fut.result()
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\websockets.py", line 133, in receive_json
self._raise_on_disconnect(message)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\websockets.py", line 105, in _raise_on_disconnect
raise WebSocketDisconnect(message["code"])
starlette.websockets.WebSocketDisconnect: 1001
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py", line 250, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\applications.py", line 273, in __call__
await super().__call__(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\errors.py", line 149, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\cors.py", line 76, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\gzip.py", line 26, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
raise exc
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
raise e
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 341, in handle
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 82, in app
await func(session)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\routing.py", line 289, in app
await dependant.call(**values)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\gradio\routes.py", line 604, in join_queue
session_info = await asyncio.wait_for(
File "C:\Users\PC2022\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 445, in wait_for
return fut.result()
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\websockets.py", line 133, in receive_json
self._raise_on_disconnect(message)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\websockets.py", line 105, in _raise_on_disconnect
raise WebSocketDisconnect(message["code"])
starlette.websockets.WebSocketDisconnect: 1001
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py", line 250, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\applications.py", line 273, in __call__
await super().__call__(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\errors.py", line 149, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\cors.py", line 76, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\gzip.py", line 26, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
raise exc
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
raise e
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 341, in handle
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 82, in app
await func(session)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\routing.py", line 289, in app
await dependant.call(**values)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\gradio\routes.py", line 604, in join_queue
session_info = await asyncio.wait_for(
File "C:\Users\PC2022\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 445, in wait_for
return fut.result()
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\websockets.py", line 133, in receive_json
self._raise_on_disconnect(message)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\websockets.py", line 105, in _raise_on_disconnect
raise WebSocketDisconnect(message["code"])
starlette.websockets.WebSocketDisconnect: 1001
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py", line 250, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\applications.py", line 273, in __call__
await super().__call__(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\errors.py", line 149, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\cors.py", line 76, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\gzip.py", line 26, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
raise exc
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
raise e
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 341, in handle
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 82, in app
await func(session)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\routing.py", line 289, in app
await dependant.call(**values)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\gradio\routes.py", line 604, in join_queue
session_info = await asyncio.wait_for(
File "C:\Users\PC2022\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 445, in wait_for
return fut.result()
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\websockets.py", line 133, in receive_json
self._raise_on_disconnect(message)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\websockets.py", line 105, in _raise_on_disconnect
raise WebSocketDisconnect(message["code"])
starlette.websockets.WebSocketDisconnect: 1001
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py", line 250, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\applications.py", line 273, in __call__
await super().__call__(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\errors.py", line 149, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\cors.py", line 76, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\gzip.py", line 26, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
raise exc
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
raise e
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 341, in handle
await self.app(scope, receive, send)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\routing.py", line 82, in app
await func(session)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\fastapi\routing.py", line 289, in app
await dependant.call(**values)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\gradio\routes.py", line 604, in join_queue
session_info = await asyncio.wait_for(
File "C:\Users\PC2022\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 445, in wait_for
return fut.result()
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\websockets.py", line 133, in receive_json
self._raise_on_disconnect(message)
File "D:\ai\sd-webui-1-6\venv\lib\site-packages\starlette\websockets.py", line 105, in _raise_on_disconnect
raise WebSocketDisconnect(message["code"])
starlette.websockets.WebSocketDisconnect: 1001