报错
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/gevent/pywsgi.py", line 999, in handle_one_response
self.run_application()
File "/usr/local/lib/python3.8/dist-packages/geventwebsocket/handler.py", line 75, in run_application
self.run_websocket()
File "/usr/local/lib/python3.8/dist-packages/geventwebsocket/handler.py", line 52, in run_websocket
list(self.application(self.environ, lambda s, h, e=None: []))
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask_sockets.py", line 40, in __call__
handler, values = adapter.match()
File "/usr/local/lib/python3.8/dist-packages/werkzeug/routing.py", line 2030, in match
raise WebsocketMismatch()
werkzeug.routing.WebsocketMismatch: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand.
2021-09-17T06:58:45Z {'REMOTE_ADDR': 'xxxxx', 'REMOTE_PORT': '25428', 'HTTP_HOST': 'xxxxxx', (hidden keys: 30)} failed with WebsocketMismatch
解决办法
python3 -m pip uninstall Werkzeug -y && python3 -m pip install Werkzeug==1.0.1 -i https://mirrors.aliyun.com/pypi/simple/
网友评论