Closed reyurquiza closed 1 year ago
Can you add --log-level DEBUG
to your command, and upload new logs
C:\Users\Rei\Music>spotdl https://open.spotify.com/track/389QX9Q1eUOEZ19vtzzI9O?si=4190b5ab801b405e --log-level DEBUG [12:45:20 AM] DEBUG MainThread - Downloader settings: {'audio_providers': ['youtube-music'], downloader.py:112 'lyrics_providers': ['genius', 'azlyrics', 'musixmatch'], 'playlist_numbering': False, 'scan_for_songs': False, 'm3u': None, 'output': '{artists} - {title}.{output-ext}', 'overwrite': 'skip', 'search_query': None, 'ffmpeg': 'ffmpeg', 'bitrate': None, 'ffmpeg_args': None, 'format': 'mp3', 'save_file': None, 'filter_results': True, 'threads': 4, 'cookie_file': None, 'restrict': False, '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} [12:45:20 AM] DEBUG MainThread - FFmpeg path: ffmpeg downloader.py:130 [12:45:20 AM] DEBUG MainThread - Found 0 known songs downloader.py:155 [00:45:22] DEBUG MainThread - Archive: 0 urls downloader.py:189 [00:45:22] DEBUG MainThread - Downloader initialized downloader.py:191 [00:45:22] INFO MainThread - Processing query: https://open.spotify.com/track/389QX9Q1eUOEZ19vtzzI9O?si=4190b5ab801b405e search.py:102 [00:45:22] DEBUG MainThread - Found 1 songs in 0 lists search.py:218 [00:45:22] DEBUG MainThread - Downloading 1 songs downloader.py:238 [00:45:22] DEBUG asyncio_0 - Genius failed to find lyrics for The Beatles - While My Guitar Gently Weeps - Remastered 2009 downloader.py:354 [00:45:23] DEBUG asyncio_0 - AzLyrics failed to find lyrics for The Beatles - While My Guitar Gently Weeps - Remastered downloader.py:354 2009 [00:45:23] DEBUG asyncio_0 - Found lyrics for The Beatles - While My Guitar Gently Weeps - Remastered 2009 on MusixMatch downloader.py:348 [00:45:23] DEBUG asyncio_0 - [389QX9Q1eUOEZ19vtzzI9O] Searching for the beatles - while my guitar gently weeps - remastered 2009 base.py:160 [00:45:23] DEBUG asyncio_0 - [389QX9Q1eUOEZ19vtzzI9O] Found 1 results for ISRC GBAYE0601650 base.py:172 [00:45:24] DEBUG asyncio_0 - [389QX9Q1eUOEZ19vtzzI9O] Filtered to 1 ISRC results base.py:184 [00:45:24] DEBUG asyncio_0 - [389QX9Q1eUOEZ19vtzzI9O] Best ISRC result is https://music.youtube.com/watch?v=bI8P6ZSHSvE with base.py:193 score 100.0 [00:45:24] DEBUG asyncio_0 - Downloading The Beatles - While My Guitar Gently Weeps - Remastered 2009 using downloader.py:540 https://music.youtube.com/watch?v=bI8P6ZSHSvE [00:45:26] ERROR asyncio_0 - Traceback (most recent call last): progress_handler.py:358 File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\spotdl\providers\audio\base .py", line 337, in get_download_metadata data = self.audio_handler.extract_info(url, download=download) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 1507, in extract_info return self.extract_info(url, self.get_info_extractor(key), download, extra_info, process) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 1518, in wrapper return func(self, *args, **kwargs) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 1615, in extract_info return self.process_ie_result(ie_result, download, extra_info) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 1674, in process_ie_result ie_result = self.process_video_result(ie_result, download=download) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 2779, in process_video_result self.process_info(new_info) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 3247, in process_info success, real_download = self.dl(temp_filename, info_dict) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py", line 2970, in dl return fd.download(name, new_info, subtitle) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\common.py ", line 444, in download ret = self.real_download(filename, info_dict) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\dash.py", line 60, in real_download return self.download_and_append_fragments_multiple(args, is_fatal=lambda idx: idx == 0) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\fragment. py", line 382, in download_and_append_fragments_multiple return self.download_and_append_fragments(args[0], **kwargs) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\fragment. py", line 521, in download_and_append_fragments download_fragment(fragment, ctx) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\fragment. py", line 469, in download_fragment if not self._download_fragment( File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\fragment. py", line 124, in _downloadfragment success, = ctx['dl'].download(fragment_filename, fragment_info_dict) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\common.py ", line 444, in download ret = self.real_download(filename, info_dict) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\http.py", line 377, in real_download return download() File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\http.py", line 314, in download self._hook_progress({ File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\common.py ", line 459, in _hook_progress ph(status) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\fragment. py", line 284, in frag_progress_hook self._hook_progress(state, info_dict) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\common.py ", line 459, in _hook_progress ph(status) File "C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\spotdl\download\progress_ha ndler.py", line 430, in yt_dlp_progress_hook file_bytes = data["total_bytes"] KeyError: 'total_bytes'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File
"C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\spotdl\download\downloader.
py", line 548, in search_and_download
download_info = audio_downloader.get_download_metadata(
File
"C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\spotdl\providers\audio\base
.py", line 342, 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=bI8P6ZSHSvE
┌─────────────────────────────── Traceback (most recent call last)──────────────────┐
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\spotdl\providers\audio\b │
│ ase.py:337 in get_download_metadata │
│ │
│ 334 │ │ """ │
│ 335 │ │ │
│ 336 │ │ try: │
│ > 337 │ │ │ data = self.audio_handler.extract_info(url, download=download) │
│ 338 │ │ │ │
│ 339 │ │ │ if data: │
│ 340 │ │ │ │ return data │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py:1507 │
│ in extract_info │
│ │
│ 1504 │ │ │ │ if self.params.get('break_on_existing', False): │
│ 1505 │ │ │ │ │ raise ExistingVideoReached() │
│ 1506 │ │ │ │ break │
│ > 1507 │ │ │ return self.__extract_info(url, self.get_info_extractor(key), download, │
│ extra_info, process) │
│ 1508 │ │ else: │
│ 1509 │ │ │ extractors_restricted = self.params.get('allowed_extractors') not in (None, │
│ ['default']) │
│ 1510 │ │ │ self.report_error(f'No suitable extractor{format_field(ie_key, None, " │
│ (%s)")} found for URL {url}', │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py:1518 │
│ in wrapper │
│ │
│ 1515 │ │ def wrapper(self, *args, **kwargs): │
│ 1516 │ │ │ while True: │
│ 1517 │ │ │ │ try: │
│ > 1518 │ │ │ │ │ return func(self, *args, **kwargs) │
│ 1519 │ │ │ │ except (DownloadCancelled, LazyList.IndexError, PagedList.IndexError): │
│ 1520 │ │ │ │ │ raise │
│ 1521 │ │ │ │ except ReExtractInfo as e: │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py:1615 │
│ in __extract_info │
│ │
│ 1612 │ │ self.add_default_extra_info(ie_result, ie, url) │
│ 1613 │ │ if process: │
│ 1614 │ │ │ self._wait_for_video(ie_result) │
│ > 1615 │ │ │ return self.process_ie_result(ie_result, download, extra_info) │
│ 1616 │ │ else: │
│ 1617 │ │ │ return ie_result │
│ 1618 │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py:1674 │
│ in process_ie_result │
│ │
│ 1671 │ │ │
│ 1672 │ │ if result_type == 'video': │
│ 1673 │ │ │ self.add_extra_info(ie_result, extra_info) │
│ > 1674 │ │ │ ie_result = self.process_video_result(ie_result, download=download) │
│ 1675 │ │ │ self._raise_pending_errors(ie_result) │
│ 1676 │ │ │ additional_urls = (ie_result or {}).get('additional_urls') │
│ 1677 │ │ │ if additional_urls: │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py:2779 │
│ in process_video_result │
│ │
│ 2776 │ │ │ │ │ }) │
│ 2777 │ │ │ │ downloaded_formats.append(new_info) │
│ 2778 │ │ │ │ try: │
│ > 2779 │ │ │ │ │ self.process_info(new_info) │
│ 2780 │ │ │ │ except MaxDownloadsReached: │
│ 2781 │ │ │ │ │ max_downloads_reached = True │
│ 2782 │ │ │ │ self._raise_pending_errors(new_info) │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py:3247 │
│ in process_info │
│ │
│ 3244 │ │ │ │ │ if dl_filename is None or dl_filename == temp_filename: │
│ 3245 │ │ │ │ │ │ # dl_filename == temp_filename could mean that the file was │
│ partially downloaded with --no-part. │
│ 3246 │ │ │ │ │ │ # So we should try to resume the download │
│ > 3247 │ │ │ │ │ │ success, real_download = self.dl(temp_filename, info_dict) │
│ 3248 │ │ │ │ │ │ info_dict['__real_download'] = real_download │
│ 3249 │ │ │ │ │ else: │
│ 3250 │ │ │ │ │ │ self.report_file_already_downloaded(dl_filename) │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\YoutubeDL.py:2970 │
│ in dl │
│ │
│ 2967 │ │ new_info = self._copy_infodict(info) │
│ 2968 │ │ if new_info.get('http_headers') is None: │
│ 2969 │ │ │ new_info['http_headers'] = self._calc_headers(new_info) │
│ > 2970 │ │ return fd.download(name, new_info, subtitle) │
│ 2971 │ │
│ 2972 │ def existing_file(self, filepaths, *, default_overwrite=True): │
│ 2973 │ │ existing_files = list(filter(os.path.exists, orderedSet(filepaths))) │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\common │
│ .py:444 in download │
│ │
│ 441 │ │ │ self.to_screen(f'[download] Sleeping {sleep_interval:.2f} seconds ...') │
│ 442 │ │ │ time.sleep(sleep_interval) │
│ 443 │ │ │
│ > 444 │ │ ret = self.real_download(filename, info_dict) │
│ 445 │ │ self._finish_multiline_status() │
│ 446 │ │ return ret, True │
│ 447 │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\dash.p │
│ y:60 in real_download │
│ │
│ 57 │ │ │ │
│ 58 │ │ │ args.append([ctx, fragments_to_download, fmt]) │
│ 59 │ │ │
│ > 60 │ │ return self.download_and_append_fragments_multiple(*args, is_fatal=lambda idx: │
│ idx == 0) │
│ 61 │ │
│ 62 │ def _resolve_fragments(self, fragments, ctx): │
│ 63 │ │ fragments = fragments(ctx) if callable(fragments) else fragments │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\fragme │
│ nt.py:382 in download_and_append_fragments_multiple │
│ │
│ 379 │ │ interrupt_trigger = [True] │
│ 380 │ │ max_progress = len(args) │
│ 381 │ │ if max_progress == 1: │
│ > 382 │ │ │ return self.download_and_append_fragments(*args[0], **kwargs) │
│ 383 │ │ max_workers = self.params.get('concurrent_fragment_downloads', 1) │
│ 384 │ │ if max_progress > 1: │
│ 385 │ │ │ self._prepare_multiline_status(max_progress) │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\fragme │
│ nt.py:521 in download_and_append_fragments │
│ │
│ 518 │ │ │ │ if not interrupt_trigger[0]: │
│ 519 │ │ │ │ │ break │
│ 520 │ │ │ │ try: │
│ > 521 │ │ │ │ │ download_fragment(fragment, ctx) │
│ 522 │ │ │ │ │ result = append_fragment( │
│ 523 │ │ │ │ │ │ decrypt_fragment(fragment, self._read_fragment(ctx)), │
│ fragment['frag_index'], ctx) │
│ 524 │ │ │ │ except KeyboardInterrupt: │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\fragme │
│ nt.py:469 in download_fragment │
│ │
│ 466 │ │ │ for retry in RetryManager(self.params.get('fragment_retries'), │
│ error_callback): │
│ 467 │ │ │ │ try: │
│ 468 │ │ │ │ │ ctx['fragment_count'] = fragment.get('fragment_count') │
│ > 469 │ │ │ │ │ if not self._download_fragment( │
│ 470 │ │ │ │ │ │ │ ctx, fragment['url'], info_dict, headers, │
│ info_dict.get('request_data')): │
│ 471 │ │ │ │ │ │ return │
│ 472 │ │ │ │ except (urllib.error.HTTPError, http.client.IncompleteRead) as err: │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\fragme │
│ nt.py:124 in _download_fragment │
│ │
│ 121 │ │ │ 'request_data': request_data, │
│ 122 │ │ │ 'ctx_id': ctx.get('ctx_id'), │
│ 123 │ │ } │
│ > 124 │ │ success, _ = ctx['dl'].download(fragment_filename, fragment_info_dict) │
│ 125 │ │ if not success: │
│ 126 │ │ │ return False │
│ 127 │ │ if fragment_info_dict.get('filetime'): │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\common │
│ .py:444 in download │
│ │
│ 441 │ │ │ self.to_screen(f'[download] Sleeping {sleep_interval:.2f} seconds ...') │
│ 442 │ │ │ time.sleep(sleep_interval) │
│ 443 │ │ │
│ > 444 │ │ ret = self.real_download(filename, info_dict) │
│ 445 │ │ self._finish_multiline_status() │
│ 446 │ │ return ret, True │
│ 447 │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\http.p │
│ y:377 in real_download │
│ │
│ 374 │ │ for retry in RetryManager(self.params.get('retries'), self.report_retry): │
│ 375 │ │ │ try: │
│ 376 │ │ │ │ establish_connection() │
│ > 377 │ │ │ │ return download() │
│ 378 │ │ │ except RetryDownload as err: │
│ 379 │ │ │ │ retry.error = err.source_error │
│ 380 │ │ │ │ continue │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\http.p │
│ y:314 in download │
│ │
│ 311 │ │ │ │ else: │
│ 312 │ │ │ │ │ eta = self.calc_eta(start, time.time(), ctx.data_len - │
│ ctx.resume_len, byte_counter - ctx.resume_len) │
│ 313 │ │ │ │ │
│ > 314 │ │ │ │ self._hook_progress({ │
│ 315 │ │ │ │ │ 'status': 'downloading', │
│ 316 │ │ │ │ │ 'downloaded_bytes': byte_counter, │
│ 317 │ │ │ │ │ 'total_bytes': ctx.data_len, │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\common │
│ .py:459 in _hook_progress │
│ │
│ 456 │ │ # Some third party scripts seems to be relying on this. │
│ 457 │ │ # So keep this behavior if possible │
│ 458 │ │ for ph in self._progress_hooks: │
│ > 459 │ │ │ ph(status) │
│ 460 │ │
│ 461 │ def add_progress_hook(self, ph): │
│ 462 │ │ # See YoutubeDl.py (search for progress_hooks) for a description of │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\fragme │
│ nt.py:284 in frag_progress_hook │
│ │
│ 281 │ │ │ │ ctx['speed'] = state['speed'] = self.calc_speed( │
│ 282 │ │ │ │ │ ctx['fragment_started'], time_now, frag_downloaded_bytes) │
│ 283 │ │ │ │ ctx['prev_frag_downloaded_bytes'] = frag_downloaded_bytes │
│ > 284 │ │ │ self._hook_progress(state, info_dict) │
│ 285 │ │ │
│ 286 │ │ ctx['dl'].add_progress_hook(frag_progress_hook) │
│ 287 │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\downloader\common │
│ .py:459 in _hook_progress │
│ │
│ 456 │ │ # Some third party scripts seems to be relying on this. │
│ 457 │ │ # So keep this behavior if possible │
│ 458 │ │ for ph in self._progress_hooks: │
│ > 459 │ │ │ ph(status) │
│ 460 │ │
│ 461 │ def add_progress_hook(self, ph): │
│ 462 │ │ # See YoutubeDl.py (search for progress_hooks) for a description of │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\spotdl\download\progress │
│ _handler.py:430 in yt_dlp_progress_hook │
│ │
│ 427 │ │ """ │
│ 428 │ │ │
│ 429 │ │ if data["status"] == "downloading": │
│ > 430 │ │ │ file_bytes = data["total_bytes"] │
│ 431 │ │ │ downloaded_bytes = data["downloaded_bytes"] │
│ 432 │ │ │ │
│ 433 │ │ │ if self.parent.simple_tui and not self.parent.web_ui: │
└─────────────────────────────────────────────────────────────────────────────┘
KeyError: 'total_bytes'
The above exception was the direct cause of the following exception:
┌─────────────────────────────── Traceback (most recent call last) ──────────────────┐
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\spotdl\download\download │
│ er.py:548 in search_and_download │
│ │
│ 545 │ │ │ ) │
│ 546 │ │ │ │
│ 547 │ │ │ # Download the song using yt-dlp │
│ > 548 │ │ │ download_info = audio_downloader.get_download_metadata( │
│ 549 │ │ │ │ download_url, download=True │
│ 550 │ │ │ ) │
│ 551 │
│ │
│ C:\Users\Rei\AppData\Local\Programs\Python\Python310\lib\site-packages\spotdl\providers\audio\b │
│ ase.py:342 in get_download_metadata │
│ │
│ 339 │ │ │ if data: │
│ 340 │ │ │ │ return data │
│ 341 │ │ except Exception as exception: │
│ > 342 │ │ │ raise AudioProviderError(f"YT-DLP download error - {url}") from exception │
│ 343 │ │ │
│ 344 │ │ raise AudioProviderError(f"No metadata found for the provided url {url}") │
│ 345 │
└─────────────────────────────────────────────────────────────────────────────┘
AudioProviderError: YT-DLP download error - https://music.youtube.com/watch?v=bI8P6ZSHSvE
I will release a new version in few minutes, it fixes your issue.
System OS
Windows
Python Version
3.11 (CPython)
Install Source
pip / PyPi
Install version / commit hash
4.1.0
Expected Behavior vs Actual Behavior
No response
Steps to reproduce - Ensure to include actual links!
https://open.spotify.com/track/389QX9Q1eUOEZ19vtzzI9O?si=fac4f42ef164428a
Traceback
Other details
I've tried this with a playlist and every song resulted in "AudioProviderError: YT-DLP download error - ...".