mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.
GNU General Public License v3.0
7.98k stars 643 forks source link

Getting yt_dlp.utils.DownloadError: ERROR when searching #1216

Closed hubitor closed 1 year ago

hubitor commented 1 year ago

I'm getting following error when I start yt (installed it via pipx) and initiate some search:

$ yt
/something

or when directly searching

$ yt /something

Issue / Suggestion

Search results for something                                     [1/3>
> ERROR: [youtube] X: Unable to extract uploader id; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
Exception in thread Thread-1 (_preload):
Traceback (most recent call last):
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1502, in wrapper
    return func(self, *args, **kwargs)
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1578, in __extract_info
    ie_result = ie.extract(url)
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 680, in extract
    ie_result = self._real_extract(url)
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/yt_dlp/extractor/youtube.py", line 4049, in _real_extract
    'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 1228, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
yt_dlp.utils.RegexNotFoundError: [youtube] X: Unable to extract uploader id; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/mps_youtube/streams.py", line 189, in _preload
    streamlist = get(song)
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/mps_youtube/streams.py", line 54, in get
    ps = pafy.get_video_streams(ytid)
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/mps_youtube/pafy.py", line 38, in get_video_streams
    info_dict = ydl.extract_info(ytid, download=False)
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1491, in extract_info
    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1520, in wrapper
    self.report_error(str(e), e.format_traceback())
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1012, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 952, in trouble
    raise DownloadError(message, exc_info)
yt_dlp.utils.DownloadError: ERROR: [youtube] X: Unable to extract uploader id; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U

Your Environment

OS: Arch Linux Music Player: VLC

The error is supposed to be fixed in the latest version of yt-dlp (installed via pacman) and I'm already running the latest version:

❯ yt-dlp --version   
2023.02.17

Getting error when running "mpsyt --version"

❯ mpsyt --version
Traceback (most recent call last):
  File "/home/user/.local/bin/mpsyt", line 5, in <module>
    from mps_youtube import main
  File "/home/user/.local/lib/python3.10/site-packages/mps_youtube/__init__.py", line 7, in <module>
    from . import init
  File "/home/user/.local/lib/python3.10/site-packages/mps_youtube/init.py", line 10, in <module>
    import pafy
ModuleNotFoundError: No module named 'pafy'
❯ yt --version  
yewtube version    : 2.9.2
yt_dlp version     : 2023.01.06
Python version     : 3.10.9 (main, Dec 19 2022, 17:35:49) [GCC 12.2.0]
Processor          :
Machine type       : x86_64
Architecture       : 64bit, ELF
Platform           : Linux-6.1.13-1-lts-x86_64-with-glibc2.37
sys.stdout.enc     : utf-8
default enc        : utf-8
Config dir         : /home/user/.config/mps-youtube
dbus               : None
glib               : False
env:TERM           : xterm-256color
env:SHELL          : /usr/bin/zsh
env:LANG           : en_US.UTF-8

pafy is installed in another path (installed it via pipx)...

❯ locate pafy       
/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/mps_youtube/pafy.py
/home/user/.local/pipx/venvs/yewtube/lib/python3.10/site-packages/mps_youtube/__pycache__/pafy.cpython-310.pyc
iamtalhaasghar commented 1 year ago

ERROR: [youtube] X: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U

As your bug report says, update yt-dlp inside yewtube's virtualenv to latest version.

hubitor commented 1 year ago

I'm already running the latest version of yt-dlp (2023.02.17), as I mentioned before.

iamtalhaasghar commented 1 year ago

❯ yt --version
yewtube version : 2.9.2 yt_dlp version : 2023.01.06 Python version : 3.10.9 (main, Dec 19 2022, 17:35:49) [GCC 12.2.0] Processor : Machine type : x86_64 Architecture : 64bit, ELF Platform : Linux-6.1.13-1-lts-x86_64-with-glibc2.37 sys.stdout.enc : utf-8 default enc : utf-8 Config dir : /home/user/.config/mps-youtube dbus : None glib : False env:TERM : xterm-256color env:SHELL : /usr/bin/zsh env:LANG : en_US.UTF-8

Dear you are not using latest version of yt-dlp.

iamtalhaasghar commented 1 year ago

ERROR: [youtube] X: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U

As your bug report says, update yt-dlp inside yewtube's virtualenv to latest version.

Check this out.

hubitor commented 1 year ago

Thanks. Now is working again...