Teekeks / pyTwitchAPI

A Python 3.7 compatible implementation of the Twitch API, EventSub, PubSub and Chat
https://pytwitchapi.dev
MIT License
254 stars 38 forks source link

AttributeError: 'ClientWebSocketResponse' object has no attribute 'open' #176

Closed ReggX closed 1 year ago

ReggX commented 1 year ago

I had a disconnect while having some pubsub subscriptions running. The reconnect failed with the following traceback:

Task exception was never retrieved
future: <Task finished name='Task-711' coro=<PubSub.__handle_reconnect() done, defined at D:\git\Twitch\venv\Lib\site-packages\twitchAPI\pubsub.py:321> exception=AttributeError("'ClientWebSocketResponse' object has no attribute 'open'")>
Traceback (most recent call last):
  File "D:\git\Twitch\venv\Lib\site-packages\twitchAPI\pubsub.py", line 323, in __handle_reconnect
    await self.__connect()
  File "D:\git\Twitch\venv\Lib\site-packages\twitchAPI\pubsub.py", line 167, in __connect
    if self.__connection is not None and self.__connection.open:
                                         ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ClientWebSocketResponse' object has no attribute 'open'