Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Bool object is not subscriptable on various channels #795

Open
2 tasks done
lucyrose39 opened this issue Aug 22, 2024 · 2 comments
Open
2 tasks done

[Bug]: Bool object is not subscriptable on various channels #795

lucyrose39 opened this issue Aug 22, 2024 · 2 comments
Labels
pending-release Fixed and pending release

Comments

@lucyrose39
Copy link

I've read the documentation

Operating System

Debian 12 Bookworm

Your Bug Report

Describe the bug

On random channels, the subscribe function throws bool object is not subscriptable

Steps To Reproduce

Subscribe to any of the below channels
https://www.youtube.com/@Aiobahn/videos
https://www.youtube.com/@x0o0x_

Expected behavior

channel subscription is added and videos queued for download

Relevant log output

2024-08-22 19:40:55 https://www.youtube.com/@Aiobahn/videos
2024-08-22 19:40:55 [2024-08-22 05:40:55,992: INFO/MainProcess] Task subscribe_to[d342f5f3-7e59-48c6-8c00-b8bc85db0f40] received
2024-08-22 19:40:55 [2024-08-22 05:40:55,994: WARNING/ForkPoolWorker-15] subscribe_to create callback
2024-08-22 19:40:56 [2024-08-22 05:40:56,690: WARNING/ForkPoolWorker-15] UC3XZCxTQ55JkT35W27Jtbyg: get metadata from es
2024-08-22 19:40:56 [2024-08-22 05:40:56,695: WARNING/ForkPoolWorker-15] {"_index":"ta_channel","_id":"UC3XZCxTQ55JkT35W27Jtbyg","found":false}
2024-08-22 19:40:56 [2024-08-22 05:40:56,695: WARNING/ForkPoolWorker-15] UC3XZCxTQ55JkT35W27Jtbyg: get metadata from youtube
2024-08-22 19:40:57 [pid: 607|app: 0|req: 5807/5807] 172.20.0.1 () {54 vars in 814 bytes} [Thu Aug 22 05:40:57 2024] GET /robots.txt?1724319657885 => generated 179 bytes in 1 msecs (HTTP/1.1 404) 7 headers in 228 bytes (1 switches on core 0)
2024-08-22 19:40:57 [2024-08-22 05:40:57,561: WARNING/ForkPoolWorker-8] WARNING: [youtube] aJEmcQiijnQ: nsig extraction failed: Some formats may be missing
2024-08-22 19:40:57          Install PhantomJS to workaround the issue. Please download it from https://phantomjs.org/download.html
2024-08-22 19:40:57          n = 0b-7rF1ZjHOwp2VNHve ; player = https://www.youtube.com/s/player/6db2bd17/player_ias.vflset/en_US/base.js
2024-08-22 19:40:57 [2024-08-22 05:40:57,567: WARNING/ForkPoolWorker-8] WARNING: [youtube] aJEmcQiijnQ: nsig extraction failed: Some formats may be missing
2024-08-22 19:40:57          Install PhantomJS to workaround the issue. Please download it from https://phantomjs.org/download.html
2024-08-22 19:40:57          n = hI7OBeS-Icc6QNQD2_t ; player = https://www.youtube.com/s/player/6db2bd17/player_ias.vflset/en_US/base.js
2024-08-22 19:40:58 [2024-08-22 05:40:58,558: WARNING/ForkPoolWorker-15] ERROR: [youtube] HVsJFqDFuYQ: Premieres in 22 hours
2024-08-22 19:40:58 [2024-08-22 05:40:58,558: WARNING/ForkPoolWorker-15] https://www.youtube.com/channel/UC3XZCxTQ55JkT35W27Jtbyg: failed to get info from youtube with message ERROR: [youtube] HVsJFqDFuYQ: Premieres in 22 hours
2024-08-22 19:40:58 [2024-08-22 05:40:58,564: WARNING/ForkPoolWorker-15] d342f5f3-7e59-48c6-8c00-b8bc85db0f40 Failed callback
2024-08-22 19:40:58 [2024-08-22 05:40:58,567: ERROR/ForkPoolWorker-15] Task subscribe_to[d342f5f3-7e59-48c6-8c00-b8bc85db0f40] raised unexpected: TypeError("'bool' object is not subscriptable")
2024-08-22 19:40:58 Traceback (most recent call last):
2024-08-22 19:40:58   File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 453, in trace_task
2024-08-22 19:40:58     R = retval = fun(*args, **kwargs)
2024-08-22 19:40:58                  ^^^^^^^^^^^^^^^^^^^^
2024-08-22 19:40:58   File "/root/.local/lib/python3.11/site-packages/celery/app/trace.py", line 736, in __protected_call__
2024-08-22 19:40:58     return self.run(*args, **kwargs)
2024-08-22 19:40:58            ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-08-22 19:40:58   File "/app/home/tasks.py", line 302, in subscribe_to
2024-08-22 19:40:58     SubscriptionHandler(url_str, task=self).subscribe(expected_type)
2024-08-22 19:40:58   File "/app/home/src/download/subscriptions.py", line 392, in subscribe
2024-08-22 19:40:58     self.subscribe_type(item, expected_type=expected_type)
2024-08-22 19:40:58   File "/app/home/src/download/subscriptions.py", line 421, in subscribe_type
2024-08-22 19:40:58     self._subscribe(channel_id)
2024-08-22 19:40:58   File "/app/home/src/download/subscriptions.py", line 425, in _subscribe
2024-08-22 19:40:58     ChannelSubscription().change_subscribe(
2024-08-22 19:40:58   File "/app/home/src/download/subscriptions.py", line 118, in change_subscribe
2024-08-22 19:40:58     channel.build_json()
2024-08-22 19:40:58   File "/app/home/src/index/channel.py", line 45, in build_json
2024-08-22 19:40:58     self.process_youtube_meta()
2024-08-22 19:40:58   File "/app/home/src/index/channel.py", line 53, in process_youtube_meta
2024-08-22 19:40:58     self.youtube_meta["thumbnails"].reverse()
2024-08-22 19:40:58     ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
2024-08-22 19:40:58 TypeError: 'bool' object is not subscriptable
2024-08-22 19:40:58 [2024-08-22 05:40:58,568: WARNING/ForkPoolWorker-15] d342f5f3-7e59-48c6-8c00-b8bc85db0f40 return callback

Anything else?

No response

@bbilly1
Copy link
Member

bbilly1 commented Aug 25, 2024

Unfortunate side effect trying to workaround a bug in yt-dlp where we tried to fallback to the first video in the channel for channel metadata extraction, but you see, that's a video that will premiere in a few hours in your example. :-)

So yeah, try again, should work by now.

The fix is already incoming but won't be merged for some time while we are in project freeze.

@bbilly1 bbilly1 added the pending-release Fixed and pending release label Aug 25, 2024
@lucyrose39
Copy link
Author

Thanks for the reply, good luck with the new update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-release Fixed and pending release
Projects
None yet
Development

No branches or pull requests

2 participants