Getting this error when searching for a song :
C:\Users\Octave\Desktop\spotdl>spotdl https://open.spotify.com/track/6gBFPUFcJLzWGx4lenP6h2
Fetching Song...
0%| |ETA: ?, ~min/songTraceback (most recent call last):
File "C:\Users\Octave\AppData\Local\Programs\Python\Python38\Scripts\spotdl-script.py", line 11, in <module>
load_entry_point('spotdl==3.2.0rc0', 'console_scripts', 'spotdl')()
File "c:\users\octave\appdata\local\programs\python\python38\lib\site-packages\spotdl\__main__.py", line 88, in console_entry_point
downloader.download_single_song(song)
File "c:\users\octave\appdata\local\programs\python\python38\lib\site-packages\spotdl\download\downloader.py", line 283, in download_single_song
download_song(songObj, self.displayManager, self.downloadTracker)
File "c:\users\octave\appdata\local\programs\python\python38\lib\site-packages\spotdl\download\downloader.py", line 103, in download_song
youtubeHandler = YouTube(
File "c:\users\octave\appdata\local\programs\python\python38\lib\site-packages\pytube\__main__.py", line 91, in __init__
self.prefetch()
File "c:\users\octave\appdata\local\programs\python\python38\lib\site-packages\pytube\__main__.py", line 183, in prefetch
self.js_url = extract.js_url(self.watch_html)
File "c:\users\octave\appdata\local\programs\python\python38\lib\site-packages\pytube\extract.py", line 143, in js_url
base_js = get_ytplayer_config(html)["assets"]["js"]
KeyError: 'assets'
The whole process left me with a goosebumps.spotdlTrackingFile file.
I'm getting the exact same error
spotdl https://open.spotify.com/track/7bCfHiRcfUjG0YVVNUL7Ve
Fetching Song...
0%| |ETA: ?, ~min/songTraceback (most recent call last):
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\Scripts\spotdl-script.py", line 11, in <module>
load_entry_point('spotdl==3.2.0rc0', 'console_scripts', 'spotdl')()
File "c:\users\admin\appdata\local\programs\python\python38\lib\site-packages\spotdl\__main__.py", line 88, in console_entry_point
downloader.download_single_song(song)
File "c:\users\admin\appdata\local\programs\python\python38\lib\site-packages\spotdl\download\downloader.py", line 283, in download_single_song
download_song(songObj, self.displayManager, self.downloadTracker)
File "c:\users\admin\appdata\local\programs\python\python38\lib\site-packages\spotdl\download\downloader.py", line 103, in download_song
youtubeHandler = YouTube(
File "c:\users\admin\appdata\local\programs\python\python38\lib\site-packages\pytube\__main__.py", line 91, in __init__
self.prefetch()
File "c:\users\admin\appdata\local\programs\python\python38\lib\site-packages\pytube\__main__.py", line 183, in prefetch
self.js_url = extract.js_url(self.watch_html)
File "c:\users\admin\appdata\local\programs\python\python38\lib\site-packages\pytube\extract.py", line 143, in js_url
base_js = get_ytplayer_config(html)["assets"]["js"]
KeyError: 'assets'
Upgrade to the latest version
same here...
`Fetching Playlist...
0%| |ETA: ?, ~min/songmultiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(args, *kwds))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/download/downloader.py", line 104, in download_song
on_progress_callback = displayManager.pytube_progress_hook
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytube/__main__.py", line 91, in __init__
self.prefetch()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytube/__main__.py", line 183, in prefetch
self.js_url = extract.js_url(self.watch_html)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytube/extract.py", line 143, in js_url
base_js = get_ytplayer_config(html)["assets"]["js"]
KeyError: 'assets'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/bin/spotdl", line 8, in
sys.exit(console_entry_point())
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/__main__.py", line 116, in console_entry_point
downloader.download_multiple_songs(songObjList)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/download/downloader.py", line 297, in download_multiple_songs
for song in songObjList
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 276, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
KeyError: 'assets'`
No change with new version.
Unfortunately i have the same issue, was not able to proceed to further testing for the issue Audio Distortion#905
I have the same issue, it happens when I try downloading a song/playlist it brings up this message. I can't use anything.
$ spotdl https://open.spotify.com/track/2lCWfOtBzJRI2jakdXfdQv?si=KG6huv9XTe6SS2qFfv8h_A
Fetching Song...
0%|
(most recent call last):
File "c:\users\user_nameappdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\user_nameappdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\George\AppData\Local\Programs\Python\Python39\Scripts\spotdl.exe__main__.py", line 7, in
File "c:\users\user_nameappdata\local\programs\python\python39\lib\site-packages\spotdl__main__.py", line 100, in console_entry_point
downloader.download_single_song(song)
File "c:\users\user_nameappdata\local\programs\python\python39\lib\site-packages\spotdl\download\downloader.py", line 274, in download_single_song
download_song(songObj, self.displayManager, self.downloadTracker)
File "c:\users\user_nameappdata\local\programs\python\python39\lib\site-packages\spotdl\download\downloader.py", line 102, in download_song
youtubeHandler = YouTube(
File "c:\users\user_nameappdata\local\programs\python\python39\lib\site-packages\pytube__main__.py", line 91, in __init__
self.prefetch()
File "c:\users\user_nameappdata\local\programs\python\python39\lib\site-packages\pytube__main__.py", line 183, in prefetch
self.js_url = extract.js_url(self.watch_html)
File "c:\users\user_nameappdata\local\programs\python\python39\lib\site-packages\pytube\extract.py", line 143, in js_url
base_js = get_ytplayer_config(html)["assets"]["js"]
KeyError: 'assets'
Maybe it's because of ffmpeg, what file path does it need going in exactly?
same here...
`Fetching Playlist...
0%| |ETA: ?, ~min/songmultiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(args, kwds))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/download/downloader.py", line 104, in download_song
on_progress_callback = displayManager.pytube_progress_hook
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytube/main.py", line 91, in *init
self.prefetch()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytube/main.py", line 183, in prefetch
self.js_url = extract.js_url(self.watch_html)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytube/extract.py", line 143, in js_url
base_js = get_ytplayer_config(html)["assets"]["js"]
KeyError: 'assets'
"""The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/bin/spotdl", line 8, in
sys.exit(console_entry_point())
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/main.py", line 116, in console_entry_point
downloader.download_multiple_songs(songObjList)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/spotdl/download/downloader.py", line 297, in download_multiple_songs
for song in songObjList
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 276, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
KeyError: 'assets'`
My mistake, I didnโt check the list of issues carefully, upgrading pytube can solve my problem.
~ pip install -U pytube
Collecting pytube
Downloading pytube-10.0.0-py3-none-any.whl (40 kB)
|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 40 kB 579 kB/s
Requirement already satisfied, skipping upgrade: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pytube) (3.7.4.3)
Installing collected packages: pytube
Successfully installed pytube-10.0.0
โ ~
โ ~
โ ~ spotdl https://open.spotify.com/playlist/**
Fetching Playlist...
100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ|ETA: 00:03, 1.23min/song/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tqdm/std.py:528: TqdmWarning: clamping frac to range [0, 1]
colour=colour)
100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ|ETA: 00:00, 0.94min/song
100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ|ETA: 00:00, ~min/song
Very well, apparently they fixed there problem in there upstream branch. A patch will be put up by evening (hopefully).
Fixed in v.3.2.1