streamalert throws error when a youtube stream goes live. #5967

Closed
opened 2023-01-08 13:43:49 +01:00 by ltzmax · 3 comments
ltzmax commented 2023-01-08 13:43:49 +01:00 (Migrated from github.com)

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?

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.

### 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.
Kowlin commented 2023-02-07 18:28:47 +01:00 (Migrated from github.com)

Have looked into this and cannot replicate it. However proper error handling here would be a nice stopping ground. Gonna leave this open.

Have looked into this and cannot replicate it. However proper error handling here would be a nice stopping ground. Gonna leave this open.
CrystalENVT commented 2023-07-07 05:34:55 +02:00 (Migrated from github.com)

Just wanted to chime in and say that I'm having the same (or very similar) issue. Strangest part is that this was working for the longest time, & then sometime around June 30th it just stopped working. Here is a bit of logs:

[2023-07-07 03:15:06] [ERROR] red.core.cogs.Streams: An error has occurred with Streams. Please report it.
Traceback (most recent call last):
  File "/data/venv/lib/python3.11/site-packages/redbot/cogs/streams/streams.py", line 836, in check_streams
    embed, is_schedule = await stream.is_online()
                         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/venv/lib/python3.11/site-packages/redbot/cogs/streams/streamtypes.py", line 210, in is_online
    return await self.make_embed(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/venv/lib/python3.11/site-packages/redbot/cogs/streams/streamtypes.py", line 214, in make_embed
    vid_data = data["items"][0]
               ~~~~~~~~~~~~~^^^
IndexError: list index out of range

^^ This log message is repeating every 5 minutes it looks like.

Happy to provide any additional details to help track this down.

Just wanted to chime in and say that I'm having the same (or very similar) issue. Strangest part is that this was working for the longest time, & then sometime around June 30th it just stopped working. Here is a bit of logs: ``` [2023-07-07 03:15:06] [ERROR] red.core.cogs.Streams: An error has occurred with Streams. Please report it. Traceback (most recent call last): File "/data/venv/lib/python3.11/site-packages/redbot/cogs/streams/streams.py", line 836, in check_streams embed, is_schedule = await stream.is_online() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/venv/lib/python3.11/site-packages/redbot/cogs/streams/streamtypes.py", line 210, in is_online return await self.make_embed(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/venv/lib/python3.11/site-packages/redbot/cogs/streams/streamtypes.py", line 214, in make_embed vid_data = data["items"][0] ~~~~~~~~~~~~~^^^ IndexError: list index out of range ``` ^^ This log message is repeating every 5 minutes it looks like. Happy to provide any additional details to help track this down.
Owner

Fixed by #5979, which has been merged into V3/develop.

Fixed by #5979, which has been merged into V3/develop.
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#5967
No description provided.