PythonistaGuild / TwitchIO

An Async Bot/API wrapper for Twitch made in Python.
https://twitchio.dev
MIT License
798 stars 162 forks source link

Join_channel() - Getting error #218

Closed Engineer152 closed 3 years ago

Engineer152 commented 3 years ago

When trying to join channels, receiving errors:

Task exception was never retrieved
future: <Task finished name='Task-12' coro=<WSConnection._join_channel() done, defined at /opt/virtualenvs/python3/lib/python3.8/site-packages/twitchio/websocket.py:256> exception=AttributeError("'NoneType' object has no attribute 'send_str'")>
Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/twitchio/websocket.py", line 258, in _join_channel
    await self.send(f"JOIN #{channel}\r\n")
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/twitchio/websocket.py", line 201, in send
    await self._websocket.send_str(message + "\r\n")
AttributeError: 'NoneType' object has no attribute 'send_str'
IAmTomahawkx commented 3 years ago

Your websocket connection has not been started. Use bot.start to do this. For future reference, please join the discord linked in the readme for assistance with the lib