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

AudioProviderError: YT-DLP download error #2263

Closed
Zeevee0-0 opened this issue Dec 19, 2024 · 18 comments
Closed

AudioProviderError: YT-DLP download error #2263

Zeevee0-0 opened this issue Dec 19, 2024 · 18 comments
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed

Comments

@Zeevee0-0
Copy link

Zeevee0-0 commented Dec 19, 2024

System OS

Windows

Python Version

3.13 (CPython)

Install Source

pip / PyPi

Install version / commit hash

4.2.10

Expected Behavior vs Actual Behavior

This only happens with a few select of songs in my play list.
I have tried reinstalling and only started after I updated to Windows 11.

Steps to reproduce - Ensure to include actual links!

spotdl https://music.youtube.com/watch?v=vJro5KrVPic

Traceback

AudioProviderError: YT-DLP download error - https://music.youtube.com/watch?v=vJro5KrVPic

Other details

No response

@Zeevee0-0 Zeevee0-0 added the Bug Unexpected problem or unintended behavior that needs to be fixed label Dec 19, 2024
@clorirdrix
Copy link

I have mostly the same problem, it started this week, already on windows 11, does that with many songs but i can't see a pattern why. Anyone has the same issues?

@z3r00c00l
Copy link

z3r00c00l commented Dec 20, 2024

Same here also already on Windows 11 24H2. I tried updating to the latest spotdl and the issue still there
error
I'm not sure which level of debug I should be running to provide more information

@Silverarmor
Copy link
Member

Not enough info. Your screenshot is downloading a spotify playlist but no link provided.
--log-level DEBUG not ran

Possible #2244

@Silverarmor Silverarmor closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2024
@TinyDerp
Copy link

Not enough info. Your screenshot is downloading a spotify playlist but no link provided. --log-level DEBUG not ran

Possible #2244

I have the same problem and I can provide the debug log:

[16:04:33] DEBUG    MainThread - Downloader settings: {'audio_providers': ['youtube-music'], 'lyrics_providers': ['genius', 'azlyrics', 'musixmatch'], 'genius_token': 'alXXDbPZtK1m2RrZ8I4k2Hn8Ahsd0Gh_o076HYvcdlBvmc0ULL1H8Z8xRlew5qaG', 'playlist_numbering':       downloader.py:129
                    False, 'playlist_retain_track_cover': False, 'scan_for_songs': False, 'm3u': None, 'output': '{artists} - {title}.{output-ext}', 'm3u_output': '#EXTINF:{duration}, {artists} - {title}.{output-ext}', 'overwrite': 'skip', 'search_query': None,
                    'ffmpeg': 'ffmpeg', 'bitrate': 'disable', 'ffmpeg_args': None, 'format': 'm4a', 'save_file': None, 'filter_results': True, 'album_type': None, 'threads': 4, 'cookie_file': 'cookies.txt', 'restrict': None, 'print_errors': False,
                    'sponsor_block': False, 'preload': False, 'archive': None, 'load_config': True, 'log_level': 'DEBUG', 'simple_tui': False, 'fetch_albums': False, 'id3_separator': ';', 'ytm_data': False, 'add_unavailable': False, 'generate_lrc': False,
                    'force_update_metadata': True, 'only_verified_results': False, 'sync_without_deleting': False, 'max_filename_length': None, 'yt_dlp_args': None, 'detect_formats': None, 'save_errors': None, 'ignore_albums': None, 'proxy': None,
                    'skip_explicit': False, 'log_format': None, 'redownload': False, 'skip_album_art': False, 'create_skip_file': False, 'respect_skip_file': False, 'sync_remove_lrc': False}
[16:04:33] DEBUG    MainThread - FFmpeg path: ffmpeg                                                                                                                                                                                                                   downloader.py:147
[16:04:33] DEBUG    MainThread - Found 0 known songs                                                                                                                                                                                                                   downloader.py:182
[16:04:34] DEBUG    MainThread - Archive: 0 urls                                                                                                                                                                                                                       downloader.py:237
[16:04:34] DEBUG    MainThread - Downloader initialized                                                                                                                                                                                                                downloader.py:239
[16:04:34] INFO     MainThread - Processing query: https://open.spotify.com/track/4NgherJDfCXWBZBYheM4jK?si=58aaa0b908fe4628                                                                                                                                               search.py:140
[16:04:50] DEBUG    MainThread - Found 1 songs in 0 lists                                                                                                                                                                                                                  search.py:353
[16:04:50] DEBUG    MainThread - Downloading 1 songs                                                                                                                                                                                                                   downloader.py:286
[16:04:52] DEBUG    asyncio_0 - Genius failed to find lyrics for KXLLSWXTCH - WASTE                                                                                                                                                                                    downloader.py:417
[16:04:52] DEBUG    asyncio_0 - AzLyrics failed to find lyrics for KXLLSWXTCH - WASTE                                                                                                                                                                                  downloader.py:417
[16:04:53] DEBUG    asyncio_0 - MusixMatch failed to find lyrics for KXLLSWXTCH - WASTE                                                                                                                                                                                downloader.py:417
[16:04:53] DEBUG    asyncio_0 - No lyrics found for KXLLSWXTCH - WASTE, lyrics providers: Genius, AzLyrics, MusixMatch                                                                                                                                                 downloader.py:585
[16:04:53] DEBUG    asyncio_0 - [4NgherJDfCXWBZBYheM4jK] Searching for kxllswxtch - waste                                                                                                                                                                                    base.py:168
[16:04:53] DEBUG    asyncio_0 - [4NgherJDfCXWBZBYheM4jK] Found 4 results for ISRC USUYG1393224                                                                                                                                                                               base.py:185
[16:04:53] DEBUG    asyncio_0 - [4NgherJDfCXWBZBYheM4jK] Filtered to 1 ISRC results                                                                                                                                                                                          base.py:213
[16:04:53] DEBUG    asyncio_0 - [4NgherJDfCXWBZBYheM4jK] Best ISRC result is https://music.youtube.com/watch?v=wotZOYXtJQo with score 100.0                                                                                                                                  base.py:222
[16:04:53] DEBUG    asyncio_0 - Downloading KXLLSWXTCH - WASTE using https://music.youtube.com/watch?v=wotZOYXtJQo                                                                                                                                                     downloader.py:690
[16:04:56] DEBUG    asyncio_0 - ERROR: unable to download video data: HTTP Error 403: Forbidden                                                                                                                                                                              base.py:395
[16:04:56] ERROR    asyncio_0 - Traceback (most recent call last):                                                                                                                                                                                               progress_handler.py:358
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 3489, in process_info
                        success, real_download = self.dl(temp_filename, info_dict)
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 3209, in dl
                        return fd.download(name, new_info, subtitle)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\common.py", line 464, in download
                        ret = self.real_download(filename, info_dict)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\http.py", line 367, in real_download
                        establish_connection()
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\http.py", line 118, in establish_connection
                        ctx.data = self.ydl.urlopen(request)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 4172, in urlopen
                        return self._request_director.send(req)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\networking\common.py", line 117, in send
                        response = handler.send(request)
                                   ^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\networking\_helper.py", line 208, in wrapper
                        return func(self, *args, **kwargs)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\networking\common.py", line 340, in send
                        return self._send(request)
                               ^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\networking\_requests.py", line 365, in _send
                        raise HTTPError(res, redirect_loop=max_redirects_exceeded)
                    yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden

                    During handling of the above exception, another exception occurred:

                    Traceback (most recent call last):
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\spotdl\providers\audio\base.py", line 390, in get_download_metadata
                        data = self.audio_handler.extract_info(url, download=download)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1623, in extract_info
                        return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1634, in wrapper
                        return func(self, *args, **kwargs)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1790, in __extract_info
                        return self.process_ie_result(ie_result, download, extra_info)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1849, in process_ie_result
                        ie_result = self.process_video_result(ie_result, download=download)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 3021, in process_video_result
                        self.process_info(new_info)
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 177, in wrapper
                        return func(self, *args, **kwargs)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 3498, in process_info
                        self.report_error(f'unable to download video data: {err}')
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1092, in report_error
                        self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 1011, in trouble
                        self.to_stderr(message)
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py", line 951, in to_stderr
                        self.params['logger'].error(message)
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\spotdl\providers\audio\base.py", line 57, in error
                        raise AudioProviderError(msg)
                    spotdl.providers.audio.base.AudioProviderError: ERROR: unable to download video data: HTTP Error 403: Forbidden

                    The above exception was the direct cause of the following exception:

                    Traceback (most recent call last):
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\spotdl\download\downloader.py", line 697, in search_and_download
                        download_info = audio_downloader.get_download_metadata(
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\spotdl\providers\audio\base.py", line 396, in get_download_metadata
                        raise AudioProviderError(f"YT-DLP download error - {url}") from exception
                    spotdl.providers.audio.base.AudioProviderError: YT-DLP download error - https://music.youtube.com/watch?v=wotZOYXtJQo

                    ╭─────────────────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────────────────────────────────────╮
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:3489 in process_info                                                                                                                        │
                    │                                                                                                                                                                                                                                          │
                    │   3486 │   │   │   │   │   if dl_filename is None or dl_filename == temp_filename:                                                                                                                                                       │
                    │   3487 │   │   │   │   │   │   # dl_filename == temp_filename could mean that the file was                                                                                                                                               │
                    │        partially downloaded with --no-part.                                                                                                                                                                                              │
                    │   3488 │   │   │   │   │   │   # So we should try to resume the download                                                                                                                                                                 │
                    │ ❱ 3489 │   │   │   │   │   │   success, real_download = self.dl(temp_filename, info_dict)                                                                                                                                                │
                    │   3490 │   │   │   │   │   │   info_dict['__real_download'] = real_download                                                                                                                                                              │
                    │   3491 │   │   │   │   │   else:                                                                                                                                                                                                         │
                    │   3492 │   │   │   │   │   │   self.report_file_already_downloaded(dl_filename)                                                                                                                                                          │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:3209 in dl                                                                                                                                  │
                    │                                                                                                                                                                                                                                          │
                    │   3206 │   │   new_info = self._copy_infodict(info)                                                                                                                                                                                      │
                    │   3207 │   │   if new_info.get('http_headers') is None:                                                                                                                                                                                  │
                    │   3208 │   │   │   new_info['http_headers'] = self._calc_headers(new_info)                                                                                                                                                               │
                    │ ❱ 3209 │   │   return fd.download(name, new_info, subtitle)                                                                                                                                                                              │
                    │   3210 │                                                                                                                                                                                                                                 │
                    │   3211 │   def existing_file(self, filepaths, *, default_overwrite=True):                                                                                                                                                                │
                    │   3212 │   │   existing_files = list(filter(os.path.exists, orderedSet(filepaths)))                                                                                                                                                      │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\common.py:464 in download                                                                                                                     │
                    │                                                                                                                                                                                                                                          │
                    │   461 │   │   │   self.to_screen(f'[download] Sleeping {sleep_interval:.2f} seconds ...')                                                                                                                                                │
                    │   462 │   │   │   time.sleep(sleep_interval)                                                                                                                                                                                             │
                    │   463 │   │                                                                                                                                                                                                                              │
                    │ ❱ 464 │   │   ret = self.real_download(filename, info_dict)                                                                                                                                                                              │
                    │   465 │   │   self._finish_multiline_status()                                                                                                                                                                                            │
                    │   466 │   │   return ret, True                                                                                                                                                                                                           │
                    │   467                                                                                                                                                                                                                                    │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\http.py:367 in real_download                                                                                                                  │
                    │                                                                                                                                                                                                                                          │
                    │   364 │   │                                                                                                                                                                                                                              │
                    │   365 │   │   for retry in RetryManager(self.params.get('retries'), self.report_retry):                                                                                                                                                  │
                    │   366 │   │   │   try:                                                                                                                                                                                                                   │
                    │ ❱ 367 │   │   │   │   establish_connection()                                                                                                                                                                                             │
                    │   368 │   │   │   │   return download()                                                                                                                                                                                                  │
                    │   369 │   │   │   except RetryDownload as err:                                                                                                                                                                                           │
                    │   370 │   │   │   │   retry.error = err.source_error                                                                                                                                                                                     │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\downloader\http.py:118 in establish_connection                                                                                                           │
                    │                                                                                                                                                                                                                                          │
                    │   115 │   │   │   │   request.headers['Range'] =                                                                                                                                                                                         │
                    │       f'bytes={int(range_start)}-{int_or_none(range_end) or ""}'                                                                                                                                                                         │
                    │   116 │   │   │   # Establish connection                                                                                                                                                                                                 │
                    │   117 │   │   │   try:                                                                                                                                                                                                                   │
                    │ ❱ 118 │   │   │   │   ctx.data = self.ydl.urlopen(request)                                                                                                                                                                               │
                    │   119 │   │   │   │   # When trying to resume, Content-Range HTTP header of response has to be                                                                                                                                           │
                    │       checked                                                                                                                                                                                                                            │
                    │   120 │   │   │   │   # to match the value of requested Range HTTP header. This is due to a                                                                                                                                              │
                    │       webservers                                                                                                                                                                                                                         │
                    │   121 │   │   │   │   # that don't support resuming and serve a whole file with no                                                                                                                                                       │
                    │       Content-Range                                                                                                                                                                                                                      │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:4172 in urlopen                                                                                                                             │
                    │                                                                                                                                                                                                                                          │
                    │   4169 │   │   clean_headers(req.headers)                                                                                                                                                                                                │
                    │   4170 │   │                                                                                                                                                                                                                             │
                    │   4171 │   │   try:                                                                                                                                                                                                                      │
                    │ ❱ 4172 │   │   │   return self._request_director.send(req)                                                                                                                                                                               │
                    │   4173 │   │   except NoSupportingHandlers as e:                                                                                                                                                                                         │
                    │   4174 │   │   │   for ue in e.unsupported_errors:                                                                                                                                                                                       │
                    │   4175 │   │   │   │   # FIXME: This depends on the order of errors.                                                                                                                                                                     │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\networking\common.py:117 in send                                                                                                                         │
                    │                                                                                                                                                                                                                                          │
                    │   114 │   │   │                                                                                                                                                                                                                          │
                    │   115 │   │   │   self._print_verbose(f'Sending request via "{handler.RH_NAME}"')                                                                                                                                                        │
                    │   116 │   │   │   try:                                                                                                                                                                                                                   │
                    │ ❱ 117 │   │   │   │   response = handler.send(request)                                                                                                                                                                                   │
                    │   118 │   │   │   except RequestError:                                                                                                                                                                                                   │
                    │   119 │   │   │   │   raise                                                                                                                                                                                                              │
                    │   120 │   │   │   except Exception as e:                                                                                                                                                                                                 │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\networking\_helper.py:208 in wrapper                                                                                                                     │
                    │                                                                                                                                                                                                                                          │
                    │   205 │   @functools.wraps(func)                                                                                                                                                                                                         │
                    │   206 │   def wrapper(self, *args, **kwargs):                                                                                                                                                                                            │
                    │   207 │   │   try:                                                                                                                                                                                                                       │
                    │ ❱ 208 │   │   │   return func(self, *args, **kwargs)                                                                                                                                                                                     │
                    │   209 │   │   except RequestError as e:                                                                                                                                                                                                  │
                    │   210 │   │   │   if e.handler is None:                                                                                                                                                                                                  │
                    │   211 │   │   │   │   e.handler = self                                                                                                                                                                                                   │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\networking\common.py:340 in send                                                                                                                         │
                    │                                                                                                                                                                                                                                          │
                    │   337 │   def send(self, request: Request) -> Response:                                                                                                                                                                                  │
                    │   338 │   │   if not isinstance(request, Request):                                                                                                                                                                                       │
                    │   339 │   │   │   raise TypeError('Expected an instance of Request')                                                                                                                                                                     │
                    │ ❱ 340 │   │   return self._send(request)                                                                                                                                                                                                 │
                    │   341 │                                                                                                                                                                                                                                  │
                    │   342 │   @abc.abstractmethod                                                                                                                                                                                                            │
                    │   343 │   def _send(self, request: Request):                                                                                                                                                                                             │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\networking\_requests.py:365 in _send                                                                                                                     │
                    │                                                                                                                                                                                                                                          │
                    │   362 │   │   res = RequestsResponseAdapter(requests_res)                                                                                                                                                                                │
                    │   363 │   │                                                                                                                                                                                                                              │
                    │   364 │   │   if not 200 <= res.status < 300:                                                                                                                                                                                            │
                    │ ❱ 365 │   │   │   raise HTTPError(res, redirect_loop=max_redirects_exceeded)                                                                                                                                                             │
                    │   366 │   │                                                                                                                                                                                                                              │
                    │   367 │   │   return res                                                                                                                                                                                                                 │
                    │   368                                                                                                                                                                                                                                    │
                    ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
                    HTTPError: HTTP Error 403: Forbidden

                    During handling of the above exception, another exception occurred:

                    ╭─────────────────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────────────────────────────────────╮
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\spotdl\providers\audio\base.py:390 in get_download_metadata                                                                                                     │
                    │                                                                                                                                                                                                                                          │
                    │   387 │   │   """                                                                                                                                                                                                                        │
                    │   388 │   │                                                                                                                                                                                                                              │
                    │   389 │   │   try:                                                                                                                                                                                                                       │
                    │ ❱ 390 │   │   │   data = self.audio_handler.extract_info(url, download=download)                                                                                                                                                         │
                    │   391 │   │   │                                                                                                                                                                                                                          │
                    │   392 │   │   │   if data:                                                                                                                                                                                                               │
                    │   393 │   │   │   │   return data                                                                                                                                                                                                        │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:1623 in extract_info                                                                                                                        │
                    │                                                                                                                                                                                                                                          │
                    │   1620 │   │   │   │   if self.params.get('break_on_existing', False):                                                                                                                                                                   │
                    │   1621 │   │   │   │   │   raise ExistingVideoReached                                                                                                                                                                                    │
                    │   1622 │   │   │   │   break                                                                                                                                                                                                             │
                    │ ❱ 1623 │   │   │   return self.__extract_info(url, self.get_info_extractor(key), download,                                                                                                                                               │
                    │        extra_info, process)                                                                                                                                                                                                              │
                    │   1624 │   │   else:                                                                                                                                                                                                                     │
                    │   1625 │   │   │   extractors_restricted = self.params.get('allowed_extractors') not in (None,                                                                                                                                           │
                    │        ['default'])                                                                                                                                                                                                                      │
                    │   1626 │   │   │   self.report_error(f'No suitable extractor{format_field(ie_key, None, "                                                                                                                                                │
                    │        (%s)")} found for URL {url}',                                                                                                                                                                                                     │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:1634 in wrapper                                                                                                                             │
                    │                                                                                                                                                                                                                                          │
                    │   1631 │   │   def wrapper(self, *args, **kwargs):                                                                                                                                                                                       │
                    │   1632 │   │   │   while True:                                                                                                                                                                                                           │
                    │   1633 │   │   │   │   try:                                                                                                                                                                                                              │
                    │ ❱ 1634 │   │   │   │   │   return func(self, *args, **kwargs)                                                                                                                                                                            │
                    │   1635 │   │   │   │   except (CookieLoadError, DownloadCancelled, LazyList.IndexError,                                                                                                                                                  │
                    │        PagedList.IndexError):                                                                                                                                                                                                            │
                    │   1636 │   │   │   │   │   raise                                                                                                                                                                                                         │
                    │   1637 │   │   │   │   except ReExtractInfo as e:                                                                                                                                                                                        │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:1790 in __extract_info                                                                                                                      │
                    │                                                                                                                                                                                                                                          │
                    │   1787 │   │   self.add_default_extra_info(ie_result, ie, url)                                                                                                                                                                           │
                    │   1788 │   │   if process:                                                                                                                                                                                                               │
                    │   1789 │   │   │   self._wait_for_video(ie_result)                                                                                                                                                                                       │
                    │ ❱ 1790 │   │   │   return self.process_ie_result(ie_result, download, extra_info)                                                                                                                                                        │
                    │   1791 │   │   else:                                                                                                                                                                                                                     │
                    │   1792 │   │   │   return ie_result                                                                                                                                                                                                      │
                    │   1793                                                                                                                                                                                                                                   │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:1849 in process_ie_result                                                                                                                   │
                    │                                                                                                                                                                                                                                          │
                    │   1846 │   │                                                                                                                                                                                                                             │
                    │   1847 │   │   if result_type == 'video':                                                                                                                                                                                                │
                    │   1848 │   │   │   self.add_extra_info(ie_result, extra_info)                                                                                                                                                                            │
                    │ ❱ 1849 │   │   │   ie_result = self.process_video_result(ie_result, download=download)                                                                                                                                                   │
                    │   1850 │   │   │   self._raise_pending_errors(ie_result)                                                                                                                                                                                 │
                    │   1851 │   │   │   additional_urls = (ie_result or {}).get('additional_urls')                                                                                                                                                            │
                    │   1852 │   │   │   if additional_urls:                                                                                                                                                                                                   │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:3021 in process_video_result                                                                                                                │
                    │                                                                                                                                                                                                                                          │
                    │   3018 │   │   │   │   │   })                                                                                                                                                                                                            │
                    │   3019 │   │   │   │   downloaded_formats.append(new_info)                                                                                                                                                                               │
                    │   3020 │   │   │   │   try:                                                                                                                                                                                                              │
                    │ ❱ 3021 │   │   │   │   │   self.process_info(new_info)                                                                                                                                                                                   │
                    │   3022 │   │   │   │   except MaxDownloadsReached:                                                                                                                                                                                       │
                    │   3023 │   │   │   │   │   max_downloads_reached = True                                                                                                                                                                                  │
                    │   3024 │   │   │   │   self._raise_pending_errors(new_info)                                                                                                                                                                              │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:177 in wrapper                                                                                                                              │
                    │                                                                                                                                                                                                                                          │
                    │    174 │   @functools.wraps(func)                                                                                                                                                                                                        │
                    │    175 │   def wrapper(self, *args, **kwargs):                                                                                                                                                                                           │
                    │    176 │   │   try:                                                                                                                                                                                                                      │
                    │ ❱  177 │   │   │   return func(self, *args, **kwargs)                                                                                                                                                                                    │
                    │    178 │   │   except _UnsafeExtensionError as error:                                                                                                                                                                                    │
                    │    179 │   │   │   self.report_error(                                                                                                                                                                                                    │
                    │    180 │   │   │   │   f'The extracted extension ({error.extension!r}) is unusual '                                                                                                                                                      │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:3498 in process_info                                                                                                                        │
                    │                                                                                                                                                                                                                                          │
                    │   3495 │   │   │   │   info_dict['__finaldir'] =                                                                                                                                                                                         │
                    │        os.path.dirname(os.path.abspath(full_filename))                                                                                                                                                                                   │
                    │   3496 │   │   │                                                                                                                                                                                                                         │
                    │   3497 │   │   │   except network_exceptions as err:                                                                                                                                                                                     │
                    │ ❱ 3498 │   │   │   │   self.report_error(f'unable to download video data: {err}')                                                                                                                                                        │
                    │   3499 │   │   │   │   return                                                                                                                                                                                                            │
                    │   3500 │   │   │   except OSError as err:                                                                                                                                                                                                │
                    │   3501 │   │   │   │   raise UnavailableVideoError(err)                                                                                                                                                                                  │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:1092 in report_error                                                                                                                        │
                    │                                                                                                                                                                                                                                          │
                    │   1089 │   │   Do the same as trouble, but prefixes the message with 'ERROR:', colored                                                                                                                                                   │
                    │   1090 │   │   in red if stderr is a tty file.                                                                                                                                                                                           │
                    │   1091 │   │   """                                                                                                                                                                                                                       │
                    │ ❱ 1092 │   │   self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}',                                                                                                                                                │
                    │        *args, **kwargs)                                                                                                                                                                                                                  │
                    │   1093 │                                                                                                                                                                                                                                 │
                    │   1094 │   def write_debug(self, message, only_once=False):                                                                                                                                                                              │
                    │   1095 │   │   """Log debug message or Print message to stderr"""                                                                                                                                                                        │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:1011 in trouble                                                                                                                             │
                    │                                                                                                                                                                                                                                          │
                    │   1008 │   │   @param is_error    Whether to raise error according to ignorerrors                                                                                                                                                        │
                    │   1009 │   │   """                                                                                                                                                                                                                       │
                    │   1010 │   │   if message is not None:                                                                                                                                                                                                   │
                    │ ❱ 1011 │   │   │   self.to_stderr(message)                                                                                                                                                                                               │
                    │   1012 │   │   if self.params.get('verbose'):                                                                                                                                                                                            │
                    │   1013 │   │   │   if tb is None:                                                                                                                                                                                                        │
                    │   1014 │   │   │   │   if sys.exc_info()[0]:  # if .trouble has been called from an except                                                                                                                                               │
                    │        block                                                                                                                                                                                                                             │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\yt_dlp\YoutubeDL.py:951 in to_stderr                                                                                                                            │
                    │                                                                                                                                                                                                                                          │
                    │    948 │   │   """Print message to stderr"""                                                                                                                                                                                             │
                    │    949 │   │   assert isinstance(message, str)                                                                                                                                                                                           │
                    │    950 │   │   if self.params.get('logger'):                                                                                                                                                                                             │
                    │ ❱  951 │   │   │   self.params['logger'].error(message)                                                                                                                                                                                  │
                    │    952 │   │   else:                                                                                                                                                                                                                     │
                    │    953 │   │   │   self._write_string(f'{self._bidi_workaround(message)}\n',                                                                                                                                                             │
                    │        self._out_files.error, only_once=only_once)                                                                                                                                                                                       │
                    │    954                                                                                                                                                                                                                                   │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\spotdl\providers\audio\base.py:57 in error                                                                                                                      │
                    │                                                                                                                                                                                                                                          │
                    │    54 │   │   YTDL uses this to print errors.                                                                                                                                                                                            │
                    │    55 │   │   """                                                                                                                                                                                                                        │
                    │    56 │   │                                                                                                                                                                                                                              │
                    │ ❱  57 │   │   raise AudioProviderError(msg)                                                                                                                                                                                              │
                    │    58                                                                                                                                                                                                                                    │
                    │    59                                                                                                                                                                                                                                    │
                    │    60 ISRC_REGEX = re.compile(r"^[A-Z]{2}-?\w{3}-?\d{2}-?\d{5}$")                                                                                                                                                                        │
                    ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
                    AudioProviderError: ERROR: unable to download video data: HTTP Error 403: Forbidden

                    The above exception was the direct cause of the following exception:

                    ╭─────────────────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────────────────────────────────────╮
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\spotdl\download\downloader.py:697 in search_and_download                                                                                                        │
                    │                                                                                                                                                                                                                                          │
                    │   694 │   │   │   │   display_progress_tracker.yt_dlp_progress_hook                                                                                                                                                                      │
                    │   695 │   │   │   )                                                                                                                                                                                                                      │
                    │   696 │   │   │                                                                                                                                                                                                                          │
                    │ ❱ 697 │   │   │   download_info = audio_downloader.get_download_metadata(                                                                                                                                                                │
                    │   698 │   │   │   │   download_url, download=True                                                                                                                                                                                        │
                    │   699 │   │   │   )                                                                                                                                                                                                                      │
                    │   700                                                                                                                                                                                                                                    │
                    │                                                                                                                                                                                                                                          │
                    │ C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\spotdl\providers\audio\base.py:396 in get_download_metadata                                                                                                     │
                    │                                                                                                                                                                                                                                          │
                    │   393 │   │   │   │   return data                                                                                                                                                                                                        │
                    │   394 │   │   except Exception as exception:                                                                                                                                                                                             │
                    │   395 │   │   │   logger.debug(exception)                                                                                                                                                                                                │
                    │ ❱ 396 │   │   │   raise AudioProviderError(f"YT-DLP download error - {url}") from exception                                                                                                                                              │
                    │   397 │   │                                                                                                                                                                                                                              │
                    │   398 │   │   raise AudioProviderError(f"No metadata found for the provided url {url}")                                                                                                                                                  │
                    │   399                                                                                                                                                                                                                                    │
                    ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
                    AudioProviderError: YT-DLP download error - https://music.youtube.com/watch?v=wotZOYXtJQo
[16:04:58] DEBUG    MainThread - Took 23 seconds   

@TinyDerp
Copy link

The fix for this is adding --yt-dlp-args "-4" when using spotdl

@Markrealhd
Copy link

I have the same error and adding --yt-dlp-args "-4" doesn't fix it.
I am using the EXE file for spotDL and FFmpeg.

@anibyl
Copy link

anibyl commented Jan 10, 2025

--yt-dlp-args "-4" doesn't fix it for me either.

Disabling my VPN helped, though.

@BezShkvark0
Copy link

BezShkvark0 commented Jan 13, 2025

--yt-dlp-args "-4" didn't help me either.

Not using any VPN.

I am using CLI (Command Line Interface).

@RealHypnoticOcelot
Copy link

+1, same issue here

@Bhaggo
Copy link

Bhaggo commented Jan 14, 2025

just got an issue with this too. i don’t use python’s package manager; i use winget to install yt-dlp and pip for spot-dl. a few hours ago, everything was working fine, but that was before i updated yt-dlp and ffmpeg. now, after updating them to the latest versions (with winget), spotdl isn’t working right and is throwing this error. i’ve never had this issue until i updated the other apps.

@anibyl
Copy link

anibyl commented Jan 14, 2025

Somebody should create a new ticket since this one was closed.

@Markrealhd
Copy link

For me, it was because of the cookies I used.

@1AppleJuice6
Copy link

Fixed mine by downgrading yt-dlp to 2024.11.18

https://github.com/yt-dlp/yt-dlp/releases/tag/2024.11.18

Im using python .

1st uninstall current version -- pip uninstall yt-dlp
2nd install older version -- pip install yt-dlp==2024.11.18

@lucastsantos
Copy link

Updating yt-dlp solved for me:
pip install --upgrade yt-dlp

Went from version 2024.12.23 to 2025.01.12

@BezShkvark0
Copy link

Updating yt-dlp solved for me: pip install --upgrade yt-dlp

Went from version 2024.12.23 to 2025.01.12

My terminal says this ver. is incompatible...

image

@RealHypnoticOcelot
Copy link

Neither the most recent version nor 2024.11.18 have worked for me

@BezShkvark0
Copy link

Fixed mine by downgrading yt-dlp to 2024.11.18

https://github.com/yt-dlp/yt-dlp/releases/tag/2024.11.18

Im using python .

1st uninstall current version -- pip uninstall yt-dlp 2nd install older version -- pip install yt-dlp==2024.11.18

Well, that kinda work for me, out of 478 tracks I've successfully got 474 tracks
This is way better, comparing to "download rate" that I had before downloading yt-dlp 2024.11.18

@z3r00c00l
Copy link

Updating may not fix the issue since it seems to be caused by youtube/youtube music download protections.

After several downloads, youtube/youtube music will prompt to authenticate yourself to confirm you are not a bot (HTTPError: HTTP Error 403: Forbidden).

You can fix this by passing your youtube/youtube music session cookie to yt-dlp.
Make sure to use the session cookie from a burner/fake account since youtube /youtube music will flag your account if you are downloading too much (they can restrain your account from watching/listening youtube videos and youtube music, and if triggered too many times will ban your account)

After another several download, they will also flag your IP address so to fix this you will have to use a VPN and change endpoint connection.

Using a VPN and changing IPs on its own(without passing session cookie) is a hit and miss since you may still trigger the « bot » protection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Unexpected problem or unintended behavior that needs to be fixed
Projects
None yet
Development

No branches or pull requests