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

Key error in log message #246

Closed david9472 closed 1 year ago

david9472 commented 1 year ago

It seems like for some channels the following exception gets raised:

Task exception was never retrieved
future: <Task finished coro=<Chat._handle_notice() done, defined at /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/twitchAPI/chat.py:943> exception=KeyError('msg-id')>
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/twitchAPI/chat.py", line 948, in _handle_notice
    self.logger.debug(f'got NOTICE for channel {parsed["command"]["channel"]}: {parsed["tags"]["msg-id"]}')
KeyError: 'msg-id'

So far I have just commented out the line