Stream alerts for YouTube no longer works: "Channel does not exist" #5343

Closed
opened 2021-09-24 06:25:11 +02:00 by boringapple · 11 comments
boringapple commented 2021-09-24 06:25:11 +02:00 (Migrated from github.com)

What Red version are you using?

3.4.14

Cog name

Streams

Command name

streamalert youtube

What did you expect to happen?

I'll now send a notification in this channel when ****** is live.

What actually happened?

Error in command 'streamalert youtube'. Check your console or logs for details.

How can we reproduce this error?

1.[prefix]streamalert youtube [channelid/name]
2.
3.
...

Anything else?

Was working properly before the 3.4.14 update.
Have tried restarting bot. Have not tried restarting device hosting the bot.
Tried reassigning the API Key.

Twitch variant is working as intended

Below is the error log in the console.

[14:18:14] ERROR    [red] Exception in command 'streamalert youtube'

│ C:\Users\***\redenv\lib\site-packages\discord\ext\commands\core.py:85 in wrapped                                                                                                                                        │
│ >   85             ret = await coro(*args, **kwargs)                                                                                                                                                                            │
│ C:\Users\***\redenv\lib\site-packages\redbot\cogs\streams\streams.py:322 in youtube_alert                                                                                                                               │
│ > 322         await self.stream_alert(ctx, YoutubeStream, channel_name_or_id)                                                                                                                                                   │
│ C:\Users\***\redenv\lib\site-packages\redbot\cogs\streams\streams.py:414 in stream_alert                                                                                                                                │
│ > 414                 exists = await self.check_exists(stream)                                                                                                                                                                  │
│ C:\Users\***\redenv\lib\site-packages\redbot\cogs\streams\streams.py:701 in check_exists                                                                                                                                │
│ > 701             await stream.is_online()                                                                                                                                                                                      │
│ C:\Users\***\redenv\lib\site-packages\redbot\cogs\streams\streamtypes.py:145 in is_online                                                                                                                               │
│ > 145         for video_id in get_video_ids_from_feed(rssdata):                                                                                                                                                                 │
│ C:\Users\***\redenv\lib\site-packages\redbot\cogs\streams\streamtypes.py:49 in get_video_ids_from_feed                                                                                                                  │
│ >  49     root = ET.fromstring(feed)                                                                                                                                                                                            │
│ C:\Python38\lib\xml\etree\ElementTree.py:1320 in XML                                                                                                                                                                            │
│ > 1320     parser.feed(text)                                                                                                                                                                                                    
ParseError: not well-formed (invalid token): line 2, column 11
### What Red version are you using? 3.4.14 ### Cog name Streams ### Command name streamalert youtube ### What did you expect to happen? I'll now send a notification in this channel when ****** is live. ### What actually happened? Error in command 'streamalert youtube'. Check your console or logs for details. ### How can we reproduce this error? 1.[prefix]streamalert youtube [channelid/name] 2. 3. ... ### Anything else? Was working properly before the 3.4.14 update. Have tried restarting bot. Have not tried restarting device hosting the bot. Tried reassigning the API Key. Twitch variant is working as intended Below is the error log in the console. ```py [14:18:14] ERROR [red] Exception in command 'streamalert youtube' │ C:\Users\***\redenv\lib\site-packages\discord\ext\commands\core.py:85 in wrapped │ │ > 85 ret = await coro(*args, **kwargs) │ │ C:\Users\***\redenv\lib\site-packages\redbot\cogs\streams\streams.py:322 in youtube_alert │ │ > 322 await self.stream_alert(ctx, YoutubeStream, channel_name_or_id) │ │ C:\Users\***\redenv\lib\site-packages\redbot\cogs\streams\streams.py:414 in stream_alert │ │ > 414 exists = await self.check_exists(stream) │ │ C:\Users\***\redenv\lib\site-packages\redbot\cogs\streams\streams.py:701 in check_exists │ │ > 701 await stream.is_online() │ │ C:\Users\***\redenv\lib\site-packages\redbot\cogs\streams\streamtypes.py:145 in is_online │ │ > 145 for video_id in get_video_ids_from_feed(rssdata): │ │ C:\Users\***\redenv\lib\site-packages\redbot\cogs\streams\streamtypes.py:49 in get_video_ids_from_feed │ │ > 49 root = ET.fromstring(feed) │ │ C:\Python38\lib\xml\etree\ElementTree.py:1320 in XML │ │ > 1320 parser.feed(text) ParseError: not well-formed (invalid token): line 2, column 11 ```
aylaxd commented 2021-09-24 06:26:42 +02:00 (Migrated from github.com)

DONT SEND ME FUCKING MESSAGE

24 Eyl 2021 Cum 8:25 AM tarihinde boringapple @.***>
şunu yazdı:

What Red version are you using?

3.4.14
Cog name

Streams
Command name

streamalert youtube
What did you expect to happen?

I'll now send a notification in this channel when ****** is live.
What actually happened?

Error in command 'streamalert youtube'. Check your console or logs for
details.
How can we reproduce this error?

1.[prefix]streamalert youtube [channelid/name]
2.
3.
...
Anything else?

Was working properly before the 3.4.14 update.
Have tried restarting bot. Have not tried restarting device hosting the
bot.
Tried reassigning the API Key.

Twitch variant is working as intended

Below is the error log in the console.

[14:18:14] ERROR [red] Exception in command 'streamalert youtube'
┌───────────────────────────────────────────────────────────────────────────────────────────────
Traceback (most recent call last)
───────────────────────────────────────────────────────────────────────────────────────────────┐
│ C:\Users*

*\redenv\lib\site-packages\discord\ext\commands\core.py:85 in wrapped │ │

85 ret = await coro(args, kwargs) │ │
C:\Users
\redenv\lib\site-packages\redbot\cogs\streams\streams.py:322 in
youtube_alert │ │ > 322 await self.stream_alert(ctx, YoutubeStream,
channel_name_or_id) │ │ C:\Users**\redenv\lib\site-packages\redbot\cogs\streams\streams.py:414
in stream_alert │
│ > 414 exists = await self.check_exists(stream) │
│ C:\Users*

\redenv\lib\site-packages\redbot\cogs\streams\streams.py:701 in
check_exists │ │ > 701 await stream.is_online() │ │ C:\Users
*\redenv\lib\site-packages\redbot\cogs\streams\streamtypes.py:145
in is_online │
│ > 145 for video_id in get_video_ids_from_feed(rssdata): │
│
C:\Users***\redenv\lib\site-packages\redbot\cogs\streams\streamtypes.py:49
in get_video_ids_from_feed │
│ > 49 root = ET.fromstring(feed) │
│ C:\Python38\lib\xml\etree\ElementTree.py:1320 in XML │
│ > 1320 parser.feed(text) │

└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ?:0 │
│ │
│ ▲ │

└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
ParseError: not well-formed (invalid token): line 2, column 11

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Cog-Creators/Red-DiscordBot/issues/5343, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AS5PKGF4L2YMQZC5ZSDC7QDUDP4UVANCNFSM5EVC4MGQ
.

DONT SEND ME FUCKING MESSAGE 24 Eyl 2021 Cum 8:25 AM tarihinde boringapple ***@***.***> şunu yazdı: > What Red version are you using? > > 3.4.14 > Cog name > > Streams > Command name > > streamalert youtube > What did you expect to happen? > > I'll now send a notification in this channel when ****** is live. > What actually happened? > > Error in command 'streamalert youtube'. Check your console or logs for > details. > How can we reproduce this error? > > 1.[prefix]streamalert youtube [channelid/name] > 2. > 3. > ... > Anything else? > > Was working properly before the 3.4.14 update. > Have tried restarting bot. Have not tried restarting device hosting the > bot. > Tried reassigning the API Key. > > Twitch variant is working as intended > > Below is the error log in the console. > > [14:18:14] ERROR [red] Exception in command 'streamalert youtube' > ┌─────────────────────────────────────────────────────────────────────────────────────────────── > Traceback (most recent call last) > ───────────────────────────────────────────────────────────────────────────────────────────────┐ > │ C:\Users* > > > > *\redenv\lib\site-packages\discord\ext\commands\core.py:85 in wrapped │ │ > > 85 ret = await coro(*args, kwargs) │ │ > C:\Users*\redenv\lib\site-packages\redbot\cogs\streams\streams.py:322 in > youtube_alert │ │ > 322 await self.stream_alert(ctx, YoutubeStream, > channel_name_or_id) │ │ C:\Users**\redenv\lib\site-packages\redbot\cogs\streams\streams.py:414 > in stream_alert │ > │ > 414 exists = await self.check_exists(stream) │ > │ C:\Users* > > *\redenv\lib\site-packages\redbot\cogs\streams\streams.py:701 in > check_exists │ │ > 701 await stream.is_online() │ │ C:\Users**\redenv\lib\site-packages\redbot\cogs\streams\streamtypes.py:145 > in is_online │ > │ > 145 for video_id in get_video_ids_from_feed(rssdata): │ > │ > C:\Users***\redenv\lib\site-packages\redbot\cogs\streams\streamtypes.py:49 > in get_video_ids_from_feed │ > │ > 49 root = ET.fromstring(feed) │ > │ C:\Python38\lib\xml\etree\ElementTree.py:1320 in XML │ > │ > 1320 parser.feed(text) │ > > └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ > > ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ > │ ?:0 │ > │ │ > │ ▲ │ > > └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ > ParseError: not well-formed (invalid token): line 2, column 11 > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/Cog-Creators/Red-DiscordBot/issues/5343>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/AS5PKGF4L2YMQZC5ZSDC7QDUDP4UVANCNFSM5EVC4MGQ> > . >
Injabie3 commented 2021-09-24 07:48:55 +02:00 (Migrated from github.com)

Should be unrelated to the update: also see this on 3.5.0.dev1:

[2021-09-23 22:38:43] [ERROR] red.core.cogs.Streams: An error has occured with Streams. Please report it.
Traceback (most recent call last):
  File "/home/ubuntu/github/renchan/lib/python3.8/site-packages/Red_DiscordBot-3.5.0.dev1-py3.8.egg/redbot/cogs/streams/streams.py", line 747, in check_streams
    embed, is_schedule = await stream.is_online()
  File "/home/ubuntu/github/renchan/lib/python3.8/site-packages/Red_DiscordBot-3.5.0.dev1-py3.8.egg/redbot/cogs/streams/streamtypes.py", line 145, in is_online
    for video_id in get_video_ids_from_feed(rssdata):
  File "/home/ubuntu/github/renchan/lib/python3.8/site-packages/Red_DiscordBot-3.5.0.dev1-py3.8.egg/redbot/cogs/streams/streamtypes.py", line 49, in get_video_ids_from_feed
    root = ET.fromstring(feed)
  File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1320, in XML
    parser.feed(text)
  File "<string>", line None
Should be unrelated to the update: also see this on 3.5.0.dev1: ``` [2021-09-23 22:38:43] [ERROR] red.core.cogs.Streams: An error has occured with Streams. Please report it. Traceback (most recent call last): File "/home/ubuntu/github/renchan/lib/python3.8/site-packages/Red_DiscordBot-3.5.0.dev1-py3.8.egg/redbot/cogs/streams/streams.py", line 747, in check_streams embed, is_schedule = await stream.is_online() File "/home/ubuntu/github/renchan/lib/python3.8/site-packages/Red_DiscordBot-3.5.0.dev1-py3.8.egg/redbot/cogs/streams/streamtypes.py", line 145, in is_online for video_id in get_video_ids_from_feed(rssdata): File "/home/ubuntu/github/renchan/lib/python3.8/site-packages/Red_DiscordBot-3.5.0.dev1-py3.8.egg/redbot/cogs/streams/streamtypes.py", line 49, in get_video_ids_from_feed root = ET.fromstring(feed) File "/usr/local/lib/python3.8/xml/etree/ElementTree.py", line 1320, in XML parser.feed(text) File "<string>", line None ```
Injabie3 commented 2021-09-24 07:56:05 +02:00 (Migrated from github.com)

I think this might be a YouTube issue, given I see this for all the channels I have:

[2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Gawr Gura Ch. hololive-EN seems to not exist, will retry later
[2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Sachi Saiki 才気桜千 Channel seems to not exist, will retry later
[2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Mori Calliope Ch. hololive-EN seems to not exist, will retry later
[2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Takanashi Kiara Ch. hololive-EN seems to not exist, will retry later
[2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Ninomae Ina'nis Ch. hololive-EN seems to not exist, will retry later
[2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Watson Amelia Ch. hololive-EN seems to not exist, will retry later
[2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name HAACHAMA Ch 赤井はあと seems to not exist, will retry later

image

I think this might be a YouTube issue, given I see this for all the channels I have: ``` [2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Gawr Gura Ch. hololive-EN seems to not exist, will retry later [2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Sachi Saiki 才気桜千 Channel seems to not exist, will retry later [2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Mori Calliope Ch. hololive-EN seems to not exist, will retry later [2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Takanashi Kiara Ch. hololive-EN seems to not exist, will retry later [2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Ninomae Ina'nis Ch. hololive-EN seems to not exist, will retry later [2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name Watson Amelia Ch. hololive-EN seems to not exist, will retry later [2021-09-23 22:28:40] [INFO] red.core.cogs.Streams: Stream with name HAACHAMA Ch 赤井はあと seems to not exist, will retry later ``` ![image](https://user-images.githubusercontent.com/6710854/134625214-d366d251-ba5a-4e05-bbda-b54f591e643a.png)
Mister-42 commented 2021-09-27 23:07:45 +02:00 (Migrated from github.com)

Might this also cause watched channels to be deleted from the configuration? This was a recent bug that was supposedly fixed, but I still have this issue. If it is related to this, I won't create a new issue for that.

Might this also cause watched channels to be deleted from the configuration? This was a recent bug that was supposedly fixed, but I still have this issue. If it is related to this, I won't create a new issue for that.
Injabie3 commented 2021-09-27 23:19:25 +02:00 (Migrated from github.com)

The last brown-out (screenshot above) was more than what I observed previously (this time it was definitely longer than the default 5min x 10 retries = 50 minutes that would trigger removal 😢 ), so I also did see some channels being removed from my config.

@jack1142 what are your thoughts on bumping the retry count from #5223 even higher, or making the retry count user-configurable? Still trying to think of a better solution to this issue.

The last brown-out (screenshot above) was more than what I observed previously (this time it was definitely longer than the default 5min x 10 retries = 50 minutes that would trigger removal 😢 ), so I also did see some channels being removed from my config. @jack1142 what are your thoughts on bumping the retry count from #5223 even higher, or making the retry count user-configurable? Still trying to think of a better solution to this issue.
Mister-42 commented 2022-03-29 14:06:22 +02:00 (Migrated from github.com)

Can we have this issue addressed, please? Each and every channel I added have been deleted multiple times now, including my own.

Can we have this issue addressed, please? Each and every channel I added have been deleted multiple times now, including my own.
Jackenmen commented 2022-03-29 14:15:09 +02:00 (Migrated from github.com)

It was addressed by #5223 (this issue should have been closed) so if you're still experiencing it in the latest Red version (3.4.16), please share the logs.

It *was* addressed by #5223 (this issue should have been closed) so if you're still experiencing it in the latest Red version (3.4.16), please share the logs.
Mister-42 commented 2022-03-29 14:29:56 +02:00 (Migrated from github.com)

Given the fact that this issue was created after #5223 was implemented, the logs in this issue are still valid. Also referred to in https://github.com/Cog-Creators/Red-DiscordBot/issues/5343#issuecomment-928290513

Given the fact that this issue was created after #5223 was implemented, the logs in this issue are still valid. Also referred to in https://github.com/Cog-Creators/Red-DiscordBot/issues/5343#issuecomment-928290513
Jackenmen commented 2022-03-29 14:37:41 +02:00 (Migrated from github.com)

Oh, I thought this is a different issue (#5195), sorry.

Oh, I thought this is a different issue (#5195), sorry.
Flame442 commented 2025-08-30 23:42:29 +02:00 (Migrated from github.com)

If I'm not mistaken, the bug that causes the traceback in the original issue seems to have been attributed to Youtube scraper related protection measures. The actual actionable issue that needs to be addressed is the fact that when this (or other brownouts) happens, existing stream alerts get cleared. Perhaps there is a way to differentiate a channel no longer existing vs a temporarily unavailable service and avoid clearing the alert? Though that seems like what #5223 addressed, so is the original traceback something we can actionably fix? Is it still a traceback users are experiencing?

If I'm not mistaken, the bug that causes the traceback in the original issue seems to have been attributed to Youtube scraper related protection measures. The actual actionable issue that needs to be addressed is the fact that when this (or other brownouts) happens, existing stream alerts get cleared. Perhaps there is a way to differentiate a channel no longer existing vs a temporarily unavailable service and avoid clearing the alert? Though that seems like what #5223 addressed, so is the original traceback something we can actionably fix? Is it still a traceback users are experiencing?
Owner

Alte Fehlermeldung, die sich mit dem heutigen Code-Stand (discord.py 2.7, Python 3.11+, aktuelles Lavalink/Red-Lavalink) nicht mehr nachvollziehen lässt bzw. auf längst geänderten Code verweist. Ich schließe das Issue; falls der Fehler mit dem aktuellen Stand noch auftritt, bitte mit neuen Logs wieder öffnen.


Generated by Claude Code

Alte Fehlermeldung, die sich mit dem heutigen Code-Stand (discord.py 2.7, Python 3.11+, aktuelles Lavalink/Red-Lavalink) nicht mehr nachvollziehen lässt bzw. auf längst geänderten Code verweist. Ich schließe das Issue; falls der Fehler mit dem aktuellen Stand noch auftritt, bitte mit neuen Logs wieder öffnen. --- _Generated by [Claude Code](https://claude.ai/code)_
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#5343
No description provided.