When I run the dash-extensions examples that use run_server() rather than app.run_server() such as websocket_push.py and websocket_update.py, I get the following error when I load the app.
Traceback (most recent call last):
File "C:\Users\Z\anaconda3\envs\dash\lib\site-packages\gevent\pywsgi.py", line 999, in handle_one_response
self.run_application()
File "C:\Users\Z\anaconda3\envs\dash\lib\site-packages\geventwebsocket\handler.py", line 75, in run_application
self.run_websocket()
File "C:\Users\Z\anaconda3\envs\dash\lib\site-packages\geventwebsocket\handler.py", line 52, in run_websocket
list(self.application(self.environ, lambda s, h, e=None: []))
File "C:\Users\Z\anaconda3\envs\dash\lib\site-packages\flask\app.py", line 2088, in __call__
return self.wsgi_app(environ, start_response)
File "C:\Users\Z\anaconda3\envs\dash\lib\site-packages\flask_sockets.py", line 40, in __call__
handler, values = adapter.match()
File "C:\Users\Z\anaconda3\envs\dash\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-07-08T05:03:43Z {'REMOTE_ADDR': '::1', 'REMOTE_PORT': '59421', 'HTTP_HOST': 'localhost:5000', (hidden keys: 31)} failed with WebsocketMismatch
I’m on Windows 10, Python 3.9.5. I installed the Dash related modules just a few days ago so they should be the latest. Any suggestions on how to fix this would be appreciated. Thanks.
2 posts - 2 participants