-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
HTTPX and Celery \ GEvent Issue #3218
Comments
This looks to be caused by the httpx dependancy on trio. If I run the code: def worker(n): if name == 'main': I get: |
To clarify... we don't have a dependency on Could you migrate this issue to the |
Thanks tom .. The issue I am experiencing only happens when httpx is installed. If I removed httpx and left httpcore everything was fine. I did further testing yesterday and the underlying cause was trio. My application does not use either httpx or trio. Httpx is a dependancy of the openai > 1.0.0 package. My code that runs under gevent (via celery gevent worker) does not call any functions that use httpx or trio but having them installed causes the problem where the worker will not start. I was just pinning openai to the versions prior to using httpx for now. But found the best option was just to uninstall trio which was the root cause. I am hoping to use httpx under gevent in the future so I can make http 2.0 calls and to call the AI libraries that use HTTPX under gevent. Not sure If I will run into other issues then. Let me know if you still want me to move this to httpcore. |
Okay, here's the issue in |
Has this issue been resolved? |
Thanks @see-ann, yes. Resolved in httpcore 1.0.6. encode/httpcore#955 |
I have a gevent based celery worker that will not start if httpx is installed. My code does not use HTTPX, it was installed as a dependancy of openai.
If I pip uninstall httpx my worker runs again.
I am using Python 3.11 and the latest celery.
I also posted the issue here: celery/celery#9032
The main issue is I can't find any indication of the conflict as the celery worker just dies with nothing in the logs or system journal.
I am assuming some other package is dynamically using httpx when it is available but leads to an issue under gevent.
Is there a way to debug the package loading process to see what is trying to use httpx?
The text was updated successfully, but these errors were encountered: