betcode-org / betfair

betfairlightweight - Betfair API-NG python wrapper (with streaming)
MIT License
419 stars 147 forks source link

betfairlightweight.exceptions.SocketError: [Connect: 2]: Connection closed by server #544

Closed dickreuter closed 9 months ago

dickreuter commented 9 months ago

What could be the cause for the below?

Traceback (most recent call last): File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "/Users/dickr/dev/sickpunt/.venv/lib/python3.11/site-packages/betfairlightweight/streaming/betfairstream.py", line 60, in start self._read_loop() File "/Users/dickr/dev/sickpunt/.venv/lib/python3.11/site-packages/betfairlightweight/streaming/betfairstream.py", line 225, in _read_loop received_data_raw = self._receive_all() ^^^^^^^^^^^^^^^^^^^ File "/Users/dickr/dev/sickpunt/.venv/lib/python3.11/site-packages/betfairlightweight/streaming/betfairstream.py", line 255, in _receive_all raise SocketError( betfairlightweight.exceptions.SocketError: [Connect: 2]: Connection closed by server

liampauling commented 9 months ago

Betfair, its standard, handle it using the examples.