python-binance icon indicating copy to clipboard operation
python-binance copied to clipboard

Binance Socket Manager - Asyncio Timeout error in trade socket

Open djangoengine opened this issue 4 years ago • 1 comments

I have been using Binance Socket Manager with very good results, however suddenly started getting these errors. Seems like the connection is being refused and I could not figure out how to fix the timeout errors.

Traceback (most recent call last):

File "/binance_stream/bsm_async.py", line 54, in getdatastream

client = await AsyncClient.create()

File "/usr/local/lib/python3.9/site-packages/binance/client.py", line 7128, in create

res = await self.get_server_time()

File "/usr/local/lib/python3.9/site-packages/binance/client.py", line 7250, in get_server_time

return await self._get('time', version=self.PRIVATE_API_VERSION)

File "/usr/local/lib/python3.9/site-packages/binance/client.py", line 7211, in _get

return await self._request_api('get', path, signed, version, **kwargs)

File "/usr/local/lib/python3.9/site-packages/binance/client.py", line 7174, in _request_api

return await self._request(method, uri, signed, **kwargs)

File "/usr/local/lib/python3.9/site-packages/binance/client.py", line 7155, in _request

async with getattr(self.session, method)(uri, **kwargs) as response:

File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1117, in aenter

self._resp = await self._coro

File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 544, in _request

await resp.start(conn)

File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 905, in start

self._continue = None

File "/usr/local/lib/python3.9/site-packages/aiohttp/helpers.py", line 656, in exit

raise asyncio.TimeoutError from None

asyncio.exceptions.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn

conn = connection.create_connection(

File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 96, in create_connection

raise err

File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 86, in create_connection

sock.connect(sa)

ConnectionRefusedError: [Errno 111] Connection refused

djangoengine avatar Oct 29 '21 00:10 djangoengine

the same bug. As #1191 ,I think we should give up.

chan1919 avatar Jun 09 '23 11:06 chan1919