-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Sanic stops working after trying to open a WS connection #2904
Comments
For information, I just tried with Python 3.10.13, and it works fine. Some changes in recent Python's version must impact how Sanic behave, but my lack of deep understanding of the internals of Sanic blocks me for identifying the root cause of the problem. |
@cnicodeme I've encountered a similar problem using Sanic versions 23.12.1 and Python 3.12.3. I discovered that the issue was related to the protocol configuration. It was resolved by specifying protocol=WebSocketProtocol in the run method. Here’s the necessary import: |
Is there an existing issue for this?
Describe the bug
I recently updated my machine to the latest OS (Fedora 39). The codebase was working well before, so I suspect this might be related to the Python version:
Python: 3.12.1
Code snippet
Connecting with Firefox and with the following basic code:
Expected Behavior
Steps to reproduce the issue:
How do you run Sanic?
As a script (
app.run
orSanic.serve
)Operating System
Linux
Sanic Version
Sanic 23.6.0; Routing 23.12.0
Additional context
From the MOTD:
The text was updated successfully, but these errors were encountered: