-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
Gunicorn worker fails to boot due to NotImplementedError #2960
Comments
This sounds incredibly similar to #2848. EDIT: According to gunicorn docs (https://docs.gunicorn.org/en/stable/settings.html#worker-class), EDIT II: |
right yeah, if we're getting here in the logic then we're neither on windows nor linux (true), and the |
Yeah in #2928 I could make things work via Not entirely sure what is the best outcome to have here. |
@codebanesr does this still fail? That PR was merged a while ago but I forgot to check back here. |
I am using mysql-connector in a flask env . I have gevent for sockets, and the trio still errors out on mac. Im just using mac for development purposes.any way we can get past this in a mac |
Sorry I forgot about one extra workaround I should have specified in your issue: httpx, or well really httpcore as of 1.0.6 handles trio raising this error as if trio doesn't exist. So you might be able to bump your dependencies and that will fix things. |
I'm unable to reproduce this anymore with the following: (repro-venv) # /t/tmp.IWl7yl0JXm> cat x.py
def app(environ, start_response):
import trio
start_response("200 OK", [])
return [b"Hello, world!\n"]
(repro-venv) # /t/tmp.IWl7yl0JXm> python -m gunicorn -w 4 x:app &
(repro-venv) # /t/tmp.IWl7yl0JXm> [2025-03-20 23:14:40 +0000] [141363] [INFO] Starting gunicorn 23.0.0
[2025-03-20 23:14:40 +0000] [141363] [INFO] Listening at: http://127.0.0.1:8000 (141363)
[2025-03-20 23:14:40 +0000] [141363] [INFO] Using worker: sync
[2025-03-20 23:14:40 +0000] [141364] [INFO] Booting worker with pid: 141364
[2025-03-20 23:14:40 +0000] [141365] [INFO] Booting worker with pid: 141365
[2025-03-20 23:14:41 +0000] [141366] [INFO] Booting worker with pid: 141366
[2025-03-20 23:14:41 +0000] [141367] [INFO] Booting worker with pid: 141367
curl http://127.0.0.1:8000
Hello, world!
(repro-venv) # /t/tmp.IWl7yl0JXm> fg
Send job 1 (python -m gunicorn -w 4 x:app &) to foreground
^C[2025-03-20 23:14:52 +0000] [141363] [INFO] Handling signal: int
[2025-03-20 23:14:53 +0000] [141365] [INFO] Worker exiting (pid: 141365)
[2025-03-20 23:14:53 +0000] [141367] [INFO] Worker exiting (pid: 141367)
[2025-03-20 23:14:53 +0000] [141364] [INFO] Worker exiting (pid: 141364)
[2025-03-20 23:14:53 +0000] [141366] [INFO] Worker exiting (pid: 141366)
[2025-03-20 23:14:53 +0000] [141363] [INFO] Shutting down: Master I think we must have fixed this issue a few versions ago. |
Description:
I'm encountering a
NotImplementedError: unsupported platform
which causes my Gunicorn worker process to fail. This seems to be originating from the httpx/trio libraries. Has anyone else experienced similar issues?Error Traceback:
Environment:
pip show httpx
)pip show trio
)Let me know if any more details are necessary.
The text was updated successfully, but these errors were encountered: