Cog-Creators / Red-DiscordBot

A multi-function Discord bot
https://docs.discord.red
GNU General Public License v3.0
4.84k stars 2.31k forks source link

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

Open boringapple opened 3 years ago

boringapple commented 3 years ago

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
aylaxd commented 3 years ago

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 3 years ago

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 3 years ago

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

Mister-42 commented 3 years ago

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 3 years ago

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 2 years ago

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

Jackenmen commented 2 years ago

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 2 years ago

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 2 years ago

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