Traceback (most recent call last):
File "/home/mar/.local/lib/python3.10/site-packages/tornado/websocket.py", line 1089, in wrapper
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
Task exception was never retrieved
future: <Task finished name='Task-898' coro=<WebSocketProtocol13.write_message.<locals>.wrapper() done, defined at /home/mar/.local/lib/python3.10/site-packages/tornado/websocket.py:1085> exception=WebSocketClosedError()>
Traceback (most recent call last):
File "/home/mar/.local/lib/python3.10/site-packages/tornado/websocket.py", line 1087, in wrapper
await fut
tornado.iostream.StreamClosedError: Stream is closed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mar/.local/lib/python3.10/site-packages/tornado/websocket.py", line 1089, in wrapper
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
As for my setup:
I am running my streamlit app using streamlit run app.py. This lets me access my dashboard via the port 8501. I am accessing the dashboard using tailscale, and that is where I am experiencing this problem… If I am accessing the dasboard in my local network it works. Furthermore, the problem happens when I have more than two plotly charts, i.e., putting a third one (in the subplot) generates the problem. So maybe it just takes time to transfer the data but tornado closes the socket? I haven’t found a way to extend the timeout value.
Just been getting this error, I was trying to create a large dataframe and it was too big to handle, I shouldn’t really be using pandas at this dataset size…
Hello There!
I’m using an AWS EC2 instance to run my Streamlit app, and i’m not using any venv to install Streamlit and other dependencies. So the packages were installed in /.local directory. and when i try to run the app i was facing the same error as below
/home/ubuntu/.local/lib/python3.10/site-packages/tornado/websocket.py",
line 1090, in wrapper raise WebSocketClosedError() tornado.websocket.WebSocketClosedError.
The Solution was changing the "websocket_ping_timeout" value to 300 (default value will be 30) under the tornado settings in the below path
I am also seeing this error.
As it was deployed on vm (windows for me), after some time, it’s getting the error.
Findings:
As it was run on locally - i didn’t get any error.
As we moved to VM, there are chances, that others are interacting to our streamlit app - is this causing the error?
Error
2024-02-17 15:49:37.496 Task exception was never retrieved
future: <Task finished name='Task-111929' coro=<WebSocketProtocol13.write_message.<locals>.wrapper() done, defined at C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\tornado\websocket.py:1090> exception=WebSocketClosedError()>
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\tornado\websocket.py", line 1092, in wrapper
await fut
tornado.iostream.StreamClosedError: Stream is closed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\tornado\websocket.py", line 1094, in wrapper
raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
2024-02-17 15:50:15.394 Task exception was never retrieved
I also facing this issue, and it is a hard to reproduce error. It looks like it only happens when the internet connectivity is not so strong (like high packet loss or something), which is why I think your solution might make sense. But just to be sure, did you face this issue again after changing the timeout ?
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.