TypeError: 'NoneType' in from_directory()
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
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?
Seem to only happened once, but still should handle errors gracefully.
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.
As said, closing as a temporary Twitch glitch.