coletdjnz / yt-dlp-youtube-oauth2

[OBSOLETE] Plugin that adds OAuth2 login support to yt-dlp's YouTube extractors
The Unlicense
259 stars 38 forks source link

NameError: name 'YoutubeTabIE' is not defined #43

Closed Ulmo closed 1 month ago

Ulmo commented 1 month ago

I am getting the error "NameError: name 'YoutubeTabIE' is not defined". I have tried several things to stop this error. I tried reverting to old versions of yt-dlp. I tried commenting out a few lines in extractor/youtube.py (that end up in extractor/lazy_extractors.py and extractor/pycache files which I rebuild), but that falls back to a downloader that doesn't work. I have tried this on two computers.

The only thing that removes the error is removing this plugin.

Why would this stop working all of a sudden? What am I doing wrong? Is this something new with the code? I tried latest code, and several older versions. It seems like it's not hitting the Internet when I invoke this, but I seem to have isolated all the local things that would have caused this behavior and tried to revert to past versions that worked, but it doesn't work. Nothing changed in my local system except I saw some upgrades go by in the following build scripts:

python3 devscripts/install_deps.py --include pyinstaller
python3 devscripts/make_lazy_extractors.py
python3 -m bundle.pyinstaller

[debug] Command-line config: ['-v', '--username', 'PRIVATE', '--password', 'PRIVATE', '--live-from-start', '--socket-timeout', '5', '--embed-metadata', '--embed-info-json', '--keep-fragments', '-k', '--write-info-json', '-f', '137+140', 'https://youtu.be/OWCh3wmKtak'] [debug] User config "/home/private/yt-dlp.conf": ['--ffmpeg-location', '/home/private/src/yt-dlp/6498/yt-dlp/ffmpeg-binary-get/ffmpeg-master-latest-linux64-gpl/bin'] [debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8 [debug] yt-dlp version stable@2024.09.27 from yt-dlp/yt-dlp [c6387abc1] (zip) [debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-6.2.0-1018-lowlatency-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35) [debug] exe versions: ffmpeg N-112327-g9078dc0c52-20231005 (setts), ffprobe N-112327-g9078dc0c52-20231005, phantomjs broken, rtmpdump 2.4 [debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.08.30, mutagen-1.47.0, requests-2.32.3, secretstorage-3.3.1, sqlite3-3.37.2, urllib3-2.2.3, websockets-13.1, xattr-0.10.1 [debug] Proxy map: {} [debug] Request Handlers: urllib, requests, websockets [debug] Extractor Plugins: oauth2 (YoutubeClipIE), oauth2 (YoutubeConsentRedirectIE), oauth2 (YoutubeFavouritesIE), oauth2 (YoutubeIE), oauth2 (YoutubeMusicSearchURLIE), oauth2 (YoutubeNotificationsIE), oauth2 (YoutubeSearchDateIE), oauth2 (YoutubeSearchIE), oauth2 (YoutubeSearchURLIE), oauth2 (YoutubeTabIE) [debug] Plugin directories: ['/home/private/.yt-dlp/plugins/yt-dlp-youtube-oauth2.zip/yt_dlp_plugins'] [debug] Loaded 1828 extractors Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/tmp/yt-dlp/main.py", line 17, in File "/tmp/yt-dlp/yt_dlp/init.py", line 1086, in main File "/tmp/yt-dlp/yt_dlp/init.py", line 1076, in _real_main File "/tmp/yt-dlp/yt_dlp/YoutubeDL.py", line 3609, in download File "/tmp/yt-dlp/yt_dlp/YoutubeDL.py", line 3582, in wrapper File "/tmp/yt-dlp/yt_dlp/YoutubeDL.py", line 1601, in extract_info File "/tmp/yt-dlp/yt_dlp/extractor/lazy_extractors.py", line 163, in suitable NameError: name 'YoutubeTabIE' is not defined

Grub4K commented 1 month ago

See also https://github.com/yt-dlp/yt-dlp/issues/7859 and the linked PR https://github.com/yt-dlp/yt-dlp/pull/11205

gamer191 commented 1 month ago

The only thing that removes the error is removing this plugin.

Temporary workarounds:

  1. delete yt_dlp/extractor/lazy_extractors.py (will make yt-dlp load slightly slower, especially for non-youtube sites that begin with letters later in the alphabet)
  2. temporarily remove the plugin or rename the plugin directory, run python3 devscripts/make_lazy_extractors.py, and then re-install the plugin (will need to be done everytime you update yt-dlp, but https://github.com/yt-dlp/yt-dlp/pull/11205 will likely be merged soon)
Grub4K commented 1 month ago

https://github.com/yt-dlp/yt-dlp/pull/11205 has been merged so should be fixed