Skip to content

Instantly share code, notes, and snippets.

@raybotha
Last active July 24, 2020 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raybotha/35f4df391da8e9f7e3270a7a3ee007fa to your computer and use it in GitHub Desktop.
Save raybotha/35f4df391da8e9f7e3270a7a3ee007fa to your computer and use it in GitHub Desktop.
Traceback
2020-07-24 11:39:59.416 | ERROR    | asyncio.runners:run:43 - Task exception was never retrieved
future: <Task finished name='Task-68587' coro=<Client.open() done, defined at /Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/ccxtpro/base/client.py:118> exception=AttributeError("'bool' object has no attribute 'closed'")>
Traceback (most recent call last):

  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/aiohttp/connector.py", line 964, in _create_direct_connection
    hosts = await asyncio.shield(self._resolve_host(
                  │       │      │    └ <function TCPConnector._resolve_host at 0x10f205ca0>
                  │       │      └ <aiohttp.connector.TCPConnector object at 0x10fa21af0>
                  │       └ <function shield at 0x10e3bc1f0>
                  └ <module 'asyncio' from '/Users/ray/.pyenv/versions/3.8.3/lib/python3.8/asyncio/__init__.py'>
  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/aiohttp/connector.py", line 829, in _resolve_host
    addrs = await \
  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/aiohttp/resolver.py", line 29, in resolve
    infos = await self._loop.getaddrinfo(
                  │    │     └ <method 'getaddrinfo' of 'uvloop.loop.Loop' objects>
                  │    └ <uvloop.Loop running=True closed=False debug=False>
                  └ <aiohttp.resolver.ThreadedResolver object at 0x10fa33340>
  File "uvloop/loop.pyx", line 1469, in getaddrinfo
    return await self._getaddrinfo(

socket.gaierror: [Errno 8] nodename nor servname provided, or not known


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


Traceback (most recent call last):

  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/ccxtpro/base/client.py", line 127, in open
    self.connection = await wait_for(coroutine, timeout=int(self.connectionTimeout / 1000))
    │    │                  │        │                      │    └ 10000
    │    │                  │        │                      └ <ccxtpro.base.aiohttp_client.AiohttpClient object at 0x10fc735e0>
    │    │                  │        └ <aiohttp.client._WSRequestContextManager object at 0x10fca65c0>
    │    │                  └ <function wait_for at 0x10e3bbb80>
    │    └ True
    └ <ccxtpro.base.aiohttp_client.AiohttpClient object at 0x10fc735e0>
  File "/Users/ray/.pyenv/versions/3.8.3/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
    return fut.result()
           │   └ <method 'result' of '_asyncio.Task' objects>
           └ <Task finished name='Task-68588' coro=<<_WSRequestContextManager without __name__>()> exception=ClientConnectorError(Connecti...
  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/aiohttp/client.py", line 999, in throw
    self._coro.throw(arg)  # type: ignore
    │    │           └ gaierror(8, 'nodename nor servname provided, or not known')
    │    └ <member '_coro' of '_BaseRequestContextManager' objects>
    └ <aiohttp.client._WSRequestContextManager object at 0x10fca65c0>
  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/aiohttp/client.py", line 721, in _ws_connect
    resp = await self.request(method, url,
                 │    │       │       └ 'wss://www.bitmex.com/realtime'
                 │    │       └ 'GET'
                 │    └ <function ClientSession.request at 0x10f299700>
                 └ <aiohttp.client.ClientSession object at 0x10fa333a0>
  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/aiohttp/client.py", line 480, in _request
    conn = await self._connector.connect(
                 │    │          └ <function BaseConnector.connect at 0x10f205280>
                 │    └ <aiohttp.connector.TCPConnector object at 0x10fa21af0>
                 └ <aiohttp.client.ClientSession object at 0x10fa333a0>
  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/aiohttp/connector.py", line 523, in connect
    proto = await self._create_connection(req, traces, timeout)
                  │    │                  │    │       └ ClientTimeout(total=300, connect=None, sock_read=None, sock_connect=None)
                  │    │                  │    └ []
                  │    │                  └ <aiohttp.client_reqrep.ClientRequest object at 0x10fc73e20>
                  │    └ <function TCPConnector._create_connection at 0x10f205d30>
                  └ <aiohttp.connector.TCPConnector object at 0x10fa21af0>
  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/aiohttp/connector.py", line 858, in _create_connection
    _, proto = await self._create_direct_connection(
                     │    └ <function TCPConnector._create_direct_connection at 0x10f2660d0>
                     └ <aiohttp.connector.TCPConnector object at 0x10fa21af0>
  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/aiohttp/connector.py", line 971, in _create_direct_connection
    raise ClientConnectorError(req.connection_key, exc) from exc
          │                    │   └ <property object at 0x10f1bc900>
          │                    └ <aiohttp.client_reqrep.ClientRequest object at 0x10fc73e20>
          └ <class 'aiohttp.client_exceptions.ClientConnectorError'>

aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host www.bitmex.com:443 ssl:default [nodename nor servname provided, or not known]


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

> File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/ccxtpro/base/client.py", line 144, in open
    self.on_error(error)
    │    │        └ NetworkError(ClientConnectorError(ConnectionKey(host='www.bitmex.com', port=443, is_ssl=True, ssl=None, proxy=None, proxy_aut...
    │    └ <function Client.on_error at 0x10f698550>
    └ <ccxtpro.base.aiohttp_client.AiohttpClient object at 0x10fc735e0>
  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/ccxtpro/base/client.py", line 158, in on_error
    if not self.closed():
           │    └ <function AiohttpClient.closed at 0x10f689e50>
           └ <ccxtpro.base.aiohttp_client.AiohttpClient object at 0x10fc735e0>
  File "/Users/ray/workspace/secret_project/client/.venv/lib/python3.8/site-packages/ccxtpro/base/aiohttp_client.py", line 15, in closed
    return (self.connection is None) or self.connection.closed
            │    │                      │    └ True
            │    │                      └ <ccxtpro.base.aiohttp_client.AiohttpClient object at 0x10fc735e0>
            │    └ True
            └ <ccxtpro.base.aiohttp_client.AiohttpClient object at 0x10fc735e0>

AttributeError: 'bool' object has no attribute 'closed'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment