-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While running in a subscription mode of a symbol sometimes exception happens #78
Comments
This error keeps happening routinely, has any one else faced this? |
Task exception was never retrieved During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
I am having problems with these types of exceptions too. I don't know how to catch them. My main thread is just looping on sleep() so it has nothing to catch and apart from that all I have is a call-back. Does anyone have any tips? |
This is a problem with the API itself. I found a work-around for it, but it isn't pretty: #86 |
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<AvanzaSocket.__create_socket() done, defined at /home/anirban/.local/lib/python3.10/site-packages/avanza/avanza_socket.py:45> exception=ConnectionClosedError(None, Close(code=1011, reason='keepalive ping timeout'), None)>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/protocol.py", line 945, in transfer_data
message = await self.read_message()
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/protocol.py", line 1015, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/protocol.py", line 1090, in read_data_frame
frame = await self.read_frame(max_size)
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/protocol.py", line 1145, in read_frame
frame = await Frame.read(
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/framing.py", line 70, in read
data = await reader(2)
File "/usr/lib/python3.10/asyncio/streams.py", line 708, in readexactly
await self._wait_for_data('readexactly')
File "/usr/lib/python3.10/asyncio/streams.py", line 502, in _wait_for_data
await self._waiter
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/anirban/.local/lib/python3.10/site-packages/avanza/avanza_socket.py", line 51, in __create_socket
await self.__socket_message_handler()
File "/home/anirban/.local/lib/python3.10/site-packages/avanza/avanza_socket.py", line 172, in __socket_message_handler
async for message in self._socket:
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/protocol.py", line 482, in aiter
yield await self.recv()
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/protocol.py", line 553, in recv
await self.ensure_open()
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/protocol.py", line 930, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1011 (unexpected error) keepalive ping timeout; no close frame received
The text was updated successfully, but these errors were encountered: