waityousea / xuniren

MIT License
551 stars 159 forks source link

WebsocketMismatch #14

Closed zhang010930 closed 1 year ago

zhang010930 commented 1 year ago
raise WebsocketMismatch() from None

werkzeug.routing.exceptions.WebsocketMismatch: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand. 2023-06-02T13:34:31Z {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '55949', 'HTTP_HOST': '127.0.0.1:8800', (hidden keys: 24)} failed with WebsocketMismatch

这是什么问题呢请教一下

zhang010930 commented 1 year ago

已经解决,需要把werkzeug降到1.0.1,flask降到1.1.4

zhang010930 commented 1 year ago

太痛苦了!!!

HongdaChen commented 1 year ago

我也报这个错了,然后我按照上面兄弟的改法,又报了这个错: from markupsafe import soft_unicode ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/aikedaer/anaconda3/envs/xuniren/lib/python3.8/site-packages/markupsafe/init.py)

但是可以这样解决: pip uninstall markupsafe pip install markupsafe==2.0.1 就可以解决了。 奇怪,为什么python的包管理做的这么垃圾。。。。。。

zky001 commented 10 months ago

ImportError: cannot import name 'BaseResponse' from 'werkzeug.wrappers' (/usr/local/lib/python3.8/dist-packages/werkzeug/wrappers/init.py)又报错

zky001 commented 10 months ago

还有另一个问题 ImportError: cannot import name 'Accept' from partially initialized module 'werkzeug.datastructures' (most likely due to a circular import) (/usr/local/lib/python3.8/dist-packages/werkzeug/datastructures/init.py)