Skip to content
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

ImportError: cannot import name 'CLOSED' from 'websockets.connection' #1328

Closed
brunohjs opened this issue Apr 3, 2023 · 3 comments
Closed

Comments

@brunohjs
Copy link

brunohjs commented Apr 3, 2023

I found a problem with version v11.0 (launched yesterday). I don't know how to solve this problem from current version, but I downgraded to v10.4 to keep using the lib.
Related post: https://stackoverflow.com/questions/75913380/importerror-cannot-import-name-closed-from-websockets-connection

DeepinScreenshot_select-area_20230403185751

@aaugustin
Copy link
Member

I submitted changes to Sanic in November to prevent this issue:
sanic-org/sanic@4c14910

Sanic has had two releases since then. Can you check that you're using the latest version of Sanic, please?

If you're sticking to an old version of Sanic, you have to stick to an old version of websockets. Indeed, Sanic used to rely on implementation details of websockets, before I submitted changes to rely on the public API.

@aaugustin
Copy link
Member

Duplicate of sanic-org/sanic#2733

@aaugustin aaugustin marked this as a duplicate of sanic-org/sanic#2733 Apr 4, 2023
@brunohjs
Copy link
Author

brunohjs commented Apr 4, 2023

I submitted changes to Sanic in November to prevent this issue: sanic-org/sanic@4c14910

Sanic has had two releases since then. Can you check that you're using the latest version of Sanic, please?

If you're sticking to an old version of Sanic, you have to stick to an old version of websockets. Indeed, Sanic used to rely on implementation details of websockets, before I submitted changes to rely on the public API.

It's true. My Sanic isn't the latest version. Thank you very much @aaugustin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants