TwitchDropsMiner icon indicating copy to clipboard operation
TwitchDropsMiner copied to clipboard

TypeError: 'NoneType' in from_directory()

Open jaredcat opened this issue 2 years ago • 3 comments

Bot has been SO stable after previous fixes and finally crashed after weeks of running.

Didn't see an issue open for this specific error

89/180 - Campaign(Albion Online, Crystal Raiders Week 9 Campaign #5, 0/1)
Fatal error encountered:

Traceback (most recent call last):
  File "D:\TwitchDropsMiner\main.py", line 158, in main
    await client.run()
  File "D:\TwitchDropsMiner\twitch.py", line 768, in run
    await self._run()
  File "D:\TwitchDropsMiner\twitch.py", line 920, in _run
    new_channels.update(await self.get_live_streams(game))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\TwitchDropsMiner\twitch.py", line 1728, in get_live_streams
    Channel.from_directory(self, stream_channel_data["node"], drops_enabled=True)
  File "D:\TwitchDropsMiner\channel.py", line 115, in from_directory
    twitch, id=channel["id"], login=channel["login"], display_name=channel["displayName"]
               ~~~~~~~^^^^^^
TypeError: 'NoneType' object is not subscriptable

jaredcat avatar Mar 09 '24 04:03 jaredcat

This looks more or less like an issue on Twitch side. The error implies that a Twitch Channel object has been returned without a channel ID, which is quite nonsense, as all channels are required to have one.

Is this a one-time occurrence, or is it still happening?

DevilXD avatar Mar 09 '24 15:03 DevilXD

Seem to only happened once, but still should handle errors gracefully.

jaredcat avatar Mar 10 '24 01:03 jaredcat

This isn't an error that should be handled at all, because it's a one-off glitch. Channels cannot simply not have an ID associated to them. It looks like Twitch has temporarily messed up something on their side, that had caused this, but had since fixed it. Unless this repeats, there's nothing to do here. This issue will be simply closed if no further reports will appear.

DevilXD avatar Mar 10 '24 08:03 DevilXD

As said, closing as a temporary Twitch glitch.

DevilXD avatar Jun 22 '24 21:06 DevilXD