werkzeug.routing.WebsocketMismatch异常解决办法

Traceback (most recent call last):
  File "D:\Users\Desktop\StockQTS\venv_stock\lib\site-packages\gevent\pywsgi.py", line 999, in handle_one_response
    self.run_application()
  File "D:\Users\Desktop\StockQTS\venv_stock\lib\site-packages\geventwebsocket\handler.py", line 75, in run_application
    self.run_websocket()
  File "D:\Users\Desktop\StockQTS\venv_stock\lib\site-packages\geventwebsocket\handler.py", line 52, in run_websocket
    list(self.application(self.environ, lambda s, h, e=None: []))
  File "D:\Users\Desktop\StockQTS\venv_stock\lib\site-packages\flask\app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "D:\Users\Desktop\StockQTS\venv_stock\lib\site-packages\flask_sockets.py", line 40, in __call__
    handler, values = adapter.match()
  File "D:\Users\Desktop\StockQTS\venv_stock\lib\site-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-08-02T07:14:36Z {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '58703', 'HTTP_HOST': '127.0.0.1:9000', (hidden keys: 24)} failed with WebsocketMismatch

安装Werkzeug==1.0.0,即可解决

你可能感兴趣的:(Flask,异常问题解决)