slazarov / python-signalr-client

SignalR client for python based on asyncio.
MIT License
33 stars 22 forks source link

websockets.exceptions.ConnectionClosed: WebSocket connection is closed: code = 1006 (connection closed abnormally [internal]), no reason #14

Closed Majiick closed 5 years ago

Majiick commented 5 years ago

16:15:23 24-02-2019, CRITICAL [bittrex.py:bittrex:run_blocking:135] Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/websockets/protocol.py", line 674, in transfer_data message = yield from self.read_message() File "/usr/local/lib/python3.7/site-packages/websockets/protocol.py", line 742, in read_message frame = yield from self.read_data_frame(max_size=self.max_size) File "/usr/local/lib/python3.7/site-packages/websockets/protocol.py", line 815, in read_data_frame frame = yield from self.read_frame(max_size) File "/usr/local/lib/python3.7/site-packages/websockets/protocol.py", line 884, in read_frame extensions=self.extensions, File "/usr/local/lib/python3.7/site-packages/websockets/framing.py", line 99, in read data = yield from reader(2) File "/usr/local/lib/python3.7/asyncio/streams.py", line 679, in readexactly await self._wait_for_data('readexactly') File "/usr/local/lib/python3.7/asyncio/streams.py", line 473, in _wait_for_data await self._waiter concurrent.futures._base.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/code/data_api/bittrex.py", line 133, in run_blocking self.run() File "/code/data_api/bittrex.py", line 128, in run connection.start() File "/usr/local/lib/python3.7/site-packages/signalr_aio/_connection.py", line 36, in start self.__transport.start() File "/usr/local/lib/python3.7/site-packages/signalr_aio/transports/_transport.py", line 47, in start self.ws_loop.run_until_complete(self.socket(self.ws_loop)) File "/usr/local/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "/usr/local/lib/python3.7/site-packages/signalr_aio/transports/_transport.py", line 61, in socket await self.handler(self.ws) File "/usr/local/lib/python3.7/site-packages/signalr_aio/transports/_transport.py", line 70, in handler loop=self.ws_loop, return_exceptions=False) File "/usr/local/lib/python3.7/site-packages/signalr_aio/transports/_transport.py", line 77, in consumer_handler message = await ws.recv() File "/usr/local/lib/python3.7/site-packages/websockets/protocol.py", line 434, in recv yield from self.ensure_open() File "/usr/local/lib/python3.7/site-packages/websockets/protocol.py", line 658, in ensure_open ) from self.transfer_data_exc websockets.exceptions.ConnectionClosed: WebSocket connection is closed: code = 1006 (connection closed abnormally [internal]), no reason

Majiick commented 5 years ago

Seems to throw that out of the blue. Not sure why.

Majiick commented 5 years ago

This seems to be fixed by downgrading to websockets 6.0 from 7.0