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

when try to connect with websocket it give a error #1275

Closed
wmtamit opened this issue Dec 2, 2021 · 2 comments
Closed

when try to connect with websocket it give a error #1275

wmtamit opened this issue Dec 2, 2021 · 2 comments

Comments

@wmtamit
Copy link

wmtamit commented Dec 2, 2021

I use fast api and when i change version on uvicorn 0.13.4 to 0.14.0 then i getting this error

lib\site-package\uvicorn\protocols\websockets\websockets_impl.py", line 104, in process_request
    websockets.legacy.handshake.check_request(headers)
AttributeError: module 'websockets' has no attribute 'legacy'
websockets.legacy.handshake.check_request(headers)
AttributeError: module 'websockets' has no attribute 'legacy'

i attached the WebSocket initial code I use starlette.endpoints WebSocketEndpoint from starlette.endpoints import WebSocketEndpoint

image

for more info check here

Why I update the version because in old version not supported --ws-max-size this so please solve this as soon as possible.
if possible to increase the size of buffer request in uvicorn == 0.13.4
fastapi==0.63.0 starlette==0.13.6

@euri10
Copy link
Member

euri10 commented Dec 2, 2021

you're probably on websockets 9 and you need version 10

@euri10 euri10 closed this as completed Dec 2, 2021
@wmtamit
Copy link
Author

wmtamit commented Dec 2, 2021

it's working
Thanks

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