Skip to content

Error "AttributeError: 'NoneType' object has no attribute 'send'" #44

Description

@Avarong

When trying to use websockets.py for subscribing to idex data, ia have an error:
"
Traceback (most recent call last):
File "C:/Users/Administrator/PycharmProjects/untitled/IDEXbot.py", line 141, in
loop.run_until_complete(main())
File "C:\Users\Administrator\miniconda3\lib\asyncio\base_events.py", line 583, in run_until_complete
return future.result()
File "C:/Users/Administrator/PycharmProjects/untitled/IDEXbot.py", line 97, in main
await ism.subscribe(SubscribeCategory.markets,subscribe_list,['market_cancels', 'market_orders', 'market_trades'])
File "C:\Users\Administrator\PycharmProjects\untitled\idex\asyncio\websockets.py", line 246, in subscribe
await self._conn.send_message(category, req_msg)
File "C:\Users\Administrator\PycharmProjects\untitled\idex\asyncio\websockets.py", line 144, in send_message
await self._socket.send(socket_msg)
AttributeError: 'NoneType' object has no attribute 'send'
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x000000E14FE061C8>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x000000E14FDF4358>, 355.937)]']
connector: <aiohttp.connector.TCPConnector object at 0x000000E14FE06208>
"
How should i fix that?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions