-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
[Bug]: AttributeError: module 'h11' has no attribute 'Event' #4833
Comments
link the colab |
Need more info, but in any case you need to be running Python 3.10.x. The recommended build is 3.10.6. Several dependencies won't work with other major release versions of Python. |
lmao this is why we have 1.2k issues |
Yes. I am facing the same issue. It used to work perfectly before but this issue crawled up suddenly. |
pip install --force-reinstall httpcore==0.15 |
thanks, that just fix this problem for me |
pip install --force-reinstall httpcore==0.15 it's just on a computer, but how to register in a colab? https://colab.research.google.com/drive/1wriLAuWlY1xlfq_Zpq0Fk5WgFTRFyyOG?usp=sharing |
@TkonstAL
|
I also want to know how I can add this to the colab. https://huggingface.co/Gustavosta/MagicPrompt-Stable-Diffusion/tree/main |
I don't really know how to edit here. Where should I unpack it? https://www.reddit.com/r/StableDiffusion/comments/xvjm84/magicprompt_script_for_automatic1111_gui_let_the/ I read it but didn't fully understand. |
in your colab notebook https://www.reddit.com/r/StableDiffusion/comments/xvjm84/magicprompt_script_for_automatic1111_gui_let_the/ |
Does not work for me still. I had to update python 3.8 to 3.10 to fix this issue. But its a hassle to update python. I thought that updating httpcore should work but it didn't |
Guys both reinstalling httpcore and python doesn't work for me and I still get the same error |
I tried to force reinstall httpcore, it worked last week, but no more now. |
Have you run it with the environment activated? |
Just wanted to note I saw this today. The above recommendations worked: |
I am using Python 3.8 which seems to be the root of the problem. But if I update to Python 3.10, I get a whole problem that Torch cannot use my graphics card. Is there any way to resolve this without upgrading to 3.10? I tried: And I also tried using the files linked above by @pluieciel ... still getting the exact same error, |
cd stable-diffusion-webui also as am testing it on a pretty low spec laptop on file webui-user added: |
Just adding that I had to run the python.exe that was in the venv directory directly to get 2.0 to run on Windows 10 |
EDIT:
This worked!!!! THANK YOU! |
I just ran into this same issue because the pre-existing Python install on my PC was 3.9. I installed 3.10.8, it's working now. Maybe the startup scripts could check that the python version is correct before running venv? Since |
I uninstalled python on chocolatey to install the correct version and now when i reinstall it doesnt work. Can anyone help? |
Preface: I'm running on Windows 10 I was having the same issues. I finally got it to launch. I had installed Python 3.10, but apparently it installed for only my user. So when I launched, it used the system's Python 3.9.1 version. I uninstalled 3.10, then reinstalled for all users. But I was still getting the error. So, after seeing others in this thread talk about the Python.exe in the venv directory, I decided to nuke the whole It appears that, even after installing Python 3.10 globally, for some reason it was still using a copy (?) of Python 3.9 in the venv directory. |
This works! But what you really want to do is change the value in \venv\pyvenv.cfg to 310. That does the same thing, because nuking the whole folder for some reason used the old python version. This is how I fixed it. |
For windows(using cmd.exe): cd stable-diffusion-webui |
After trying with ubuntu 18 and 20, switched to ubuntu22.0.4 (WSL2) which come by default now with python3.10.6 Also had to install some missing stuff, here is the full list. ./webui.sh --xformers EDIT: The previous setup does not work for xformers... the fact is that xformers in WSL simply does not worth the investment. I surrender and resetup myself in plain windows.... |
If you are in WINDOWS environment make sure you are running your command prompt in elevated privilege |
Hi, The same issue, i try to instal httpcore==0.15 but problem still exist. ... >pip list | grep "http" |
Set httpcore version in requirements - fixes #4833
I uninstalled all h11 and httpcore packages. Reinstalled just h11's latest version and it worked. All the other steps mentioned above didn't work for me. |
Why not use |
I had this with conda. I removed both from pip first: |
Is there an existing issue for this?
What happened?
No run colub
Steps to reproduce the problem
What should have happened?
File "launch.py", line 256, in
start()
File "launch.py", line 247, in start
import webui
File "/content/stable-diffusion-webui/webui.py", line 13, in
from modules import devices, sd_samplers, upscaler, extensions, localization
File "/content/stable-diffusion-webui/modules/sd_samplers.py", line 11, in
from modules import prompt_parser, devices, processing, images
File "/content/stable-diffusion-webui/modules/processing.py", line 14, in
import modules.sd_hijack
File "/content/stable-diffusion-webui/modules/sd_hijack.py", line 10, in
import modules.textual_inversion.textual_inversion
File "/content/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 13, in
from modules import shared, devices, sd_hijack, processing, sd_models, images
File "/content/stable-diffusion-webui/modules/shared.py", line 8, in
import gradio as gr
File "/usr/local/lib/python3.8/site-packages/gradio/init.py", line 3, in
import gradio.components as components
File "/usr/local/lib/python3.8/site-packages/gradio/components.py", line 31, in
from gradio import media_data, processing_utils, utils
File "/usr/local/lib/python3.8/site-packages/gradio/processing_utils.py", line 20, in
from gradio import encryptor, utils
File "/usr/local/lib/python3.8/site-packages/gradio/utils.py", line 35, in
import httpx
File "/usr/local/lib/python3.8/site-packages/httpx/init.py", line 2, in
from ._api import delete, get, head, options, patch, post, put, request, stream
File "/usr/local/lib/python3.8/site-packages/httpx/_api.py", line 4, in
from ._client import Client
File "/usr/local/lib/python3.8/site-packages/httpx/_client.py", line 29, in
from ._transports.default import AsyncHTTPTransport, HTTPTransport
File "/usr/local/lib/python3.8/site-packages/httpx/_transports/default.py", line 30, in
import httpcore
File "/usr/local/lib/python3.8/site-packages/httpcore/init.py", line 1, in
from ._api import request, stream
File "/usr/local/lib/python3.8/site-packages/httpcore/_api.py", line 5, in
from ._sync.connection_pool import ConnectionPool
File "/usr/local/lib/python3.8/site-packages/httpcore/_sync/init.py", line 1, in
from .connection import HTTPConnection
File "/usr/local/lib/python3.8/site-packages/httpcore/_sync/connection.py", line 13, in
from .http11 import HTTP11Connection
File "/usr/local/lib/python3.8/site-packages/httpcore/_sync/http11.py", line 44, in
class HTTP11Connection(ConnectionInterface):
File "/usr/local/lib/python3.8/site-packages/httpcore/_sync/http11.py", line 140, in HTTP11Connection
self, event: h11.Event, timeout: Optional[float] = None
AttributeError: module 'h11' has no attribute 'Event'
Commit where the problem happens
StableDiffusionUI
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Google Chrome
Command Line Arguments
No response
Additional information, context and logs
No response
The text was updated successfully, but these errors were encountered: