Cog-Creators / Cog-Creators/Red-DiscordBot
streamalert throws error when a youtube stream goes live.
- Dominant language
- Python
- Stars
- 5.7k
- Forks
- 2.5k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
### What Red version are you using?
3.5.0.dev1
### What were you trying to do?
Getting live notifications from a youtuber.
### What did you expect to happen?
To send live streams without erroring.
### What actually happened?
```py
Jan 08 12:30:33 voltrabot python[440618]: Traceback (most recent call last):
Jan 08 12:30:33 voltrabot python[440618]: File "/home/max/redenv/lib/python3.11/site-packages/redbot/cogs/streams/streams.py", line 836, in check_streams
Jan 08 12:30:33 voltrabot python[440618]: embed, is_schedule = await stream.is_online()
Jan 08 12:30:33 voltrabot python[440618]: ^^^^^^^^^^^^^^^^^^^^^^^^
Jan 08 12:30:33 voltrabot python[440618]: File "/home/max/redenv/lib/python3.11/site-packages/redbot/cogs/streams/streamtypes.py", line 212, in is_online
Jan 08 12:30:33 voltrabot python[440618]: return await self.make_embed(data)
Jan 08 12:30:33 voltrabot python[440618]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 08 12:30:33 voltrabot python[440618]: File "/home/max/redenv/lib/python3.11/site-packages/redbot/cogs/streams/streamtypes.py", line 216, in make_embed
Jan 08 12:30:33 voltrabot python[440618]: vid_data = data["items"][0]
Jan 08 12:30:33 voltrabot python[440618]: ~~~~~~~~~~~~~^^^
Jan 08 12:30:33 voltrabot python[440618]: IndexError: list index out of range
```
### How can we reproduce this error?
1. [p]streamset youtube ishowsepeed
2. wait until he goes live.
3. check logs.
### Anything else?
Not sure if this is only for youtube but, i've mainly only seen this with youtube in my logs.
You also may go live a few times, it only sent live notifications a few times or something to me until it started erroring.
Contributor guide
Assessment
This issue has not been assessed yet.