Spotify-downloader: Different errors each time

Created on 25 Oct 2020  路  29Comments  路  Source: spotDL/spotify-downloader

First of all this works for some playlists, and i suppose it works for single song downloads as well, problem arises when downloading multiple songs(albums,playlist). Download starts, majority of the songs are downloaded but in between they give different error each time, like -

Fetching Playlist...
 98%|鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枌 |ETA: 00:04, 1.60min/songmultiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 47, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\download\downloader.py", line 170, in download_song
    audioFile = EasyID3(convertedFilePath)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\easyid3.py", line 169, in __init__
    self.load(filename)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\_util.py", line 185, in wrapper
    return func(*args, **kwargs)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\_util.py", line 156, in wrapper
    return func(self, h, *args, **kwargs)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\id3\_file.py", line 152, in load
    self._header = ID3Header(fileobj)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\_util.py", line 185, in wrapper
    return func(*args, **kwargs)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\id3\_tags.py", line 67, in __init__
    raise ID3NoHeaderError("%r doesn't start with an ID3 tag" % fn)
mutagen.id3._util.ID3NoHeaderError: '.\\Sam Smith, John Legend - Lay Me Down.mp3' doesn't start with an ID3 tag
"""

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

Traceback (most recent call last):
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\nihaa\AppData\Local\Programs\Python\Python37-32\Scripts\spotdl.exe\__main__.py", line 7, in <module>
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\__main__.py", line 116, in console_entry_point
    downloader.download_multiple_songs(songObjList)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\download\downloader.py", line 297, in download_multiple_songs
    for song in songObjList
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 276, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 657, in get
    raise self._value
mutagen.id3._util.ID3NoHeaderError: '.\\Sam Smith, John Legend - Lay Me Down.mp3' doesn't start with an ID3 tag

None the less on another playlist i got a diff error:

Fetching Album...
 96%|鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枆   |ETA: 01:58, 5.14min/songmultiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\download\downloader.py", line 117, in download_song
    skip_existing = False
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\pytube\streams.py", line 237, in download
    for chunk in request.stream(self.url):
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\pytube\request.py", line 61, in stream
    chunk = response.read(chunk_size)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\http\client.py", line 457, in read
    n = self.readinto(b)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\http\client.py", line 501, in readinto
    n = self.fp.readinto(b)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\socket.py", line 589, in readinto
    return self._sock.recv_into(b)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\ssl.py", line 1071, in recv_into
    return self.read(nbytes, buffer)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\ssl.py", line 929, in read
    return self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 47, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\download\downloader.py", line 124, in download_song
    remove(join(tempFolder, convertedFileName) + '.mp4')
FileNotFoundError: [WinError 2] The system cannot find the file specified: '.\\Temp\\Zac Efron, Zendaya - Rewrite The Stars.mp4'
"""

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

Traceback (most recent call last):
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\nihaa\AppData\Local\Programs\Python\Python37-32\Scripts\spotdl.exe\__main__.py", line 7, in <module>
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\__main__.py", line 110, in console_entry_point
    downloader.download_multiple_songs(songObjList)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\download\downloader.py", line 297, in download_multiple_songs
    for song in songObjList
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 276, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 657, in get
    raise self._value
FileNotFoundError: [Errno 2] The system cannot find the file specified: '.\\Temp\\Zac Efron, Zendaya - Rewrite The Stars.mp4'

And also i have been using modified extract.py from pytube to fix the key error - assets. Thank you!!

All 29 comments

Same Here!!

ConnectionResetError:聽[WinError聽10054]聽An聽existing聽connection聽was聽forcibly聽closed聽by聽the聽remote聽host

This is probably due to a high ping. (>60ms) or jacking up the number of simultaneous downloads. The other errors are the cascading effects of this. We haven't added error handling for this. We'll add it by the next release.

Once the download starts a .spotdlTrackingFile should be created, just pass that on to spotdl, your download should resume

We encourage you to make the required changes and open a PR. We'll help you along the way. The more contributions, the less dependent spotdl will be on any single person when errors crop up.

If interested, let us know.

@Mikhail-Zex Make changes? I know nothing about this xp, but can you tell me how to pass on .spotdlTrackingFile like you said?
Im just a beginner in python :(

Type in spotdl -h into the what ever terminal your using or read the instructions on the repo homepage

@Mikhail-Zex Yep thanks, that would be spotdl pathto.spotdlTrackingFile. Also I think this library is just great, considering that there are no other free alternatives to downloading spotify music(yes, for educational purposes only), im thinking on making an exe with this, but still the problems with pytube will effect this library too.

ConnectionResetError:聽[WinError聽10054]聽An聽existing聽connection聽was聽forcibly聽closed聽by聽the聽remote聽host

This is probably due to a high ping. (>60ms) or jacking up the number of simultaneous downloads. The other errors are the cascading effects of this. We haven't added error handling for this. We'll add it by the next release.

Once the download starts a .spotdlTrackingFile should be created, just pass that on to spotdl, your download should resume

Actually, I don't think it would be a problem due to a high ping since I solved this problem by role backing to earlier 3rd versions. Also, I used the spotdl on my vps which has a low ping.

Lol. There is an exe release already.

Thanks for the compliments. All the dev's will be super happy. Appreciation is hard to confer by these days.

馃榿

@Mikhail-Zex Oh is there an exe? Can you tell a name? You guys deserve more than appreciation, not gonna lie. Also can you tell me how to type in songs that have space in between? like spotdl Hello There.spotdlTrackingFile

Actually, I don't think it would be a problem due to a high ping since I solved this problem by role backing to earlier 3rd versions. Also, I used the spotdl on my vps which has a low ping.

@gsoosk , your telling me that the problem is in the python version? If so this is serious. Please tell me which specific version of v3 your using.

@Mikhail-Zex Oh is there an exe? Can you tell a name? You guys deserve more than appreciation, not gonna lie. Also can you tell me how to type in songs that have space in between? like spotdl Hello There.spotdlTrackingFile

SpotDL, it's under the release section.

Use double/single quotes:
spotdl "Hello There.spotdlTrackingFile"

@Mikhail-Zex I tried using double quotes, but it shows Searching for song "'Hello" and continues to download that song, and not resume download.

Use either single or double quotes, not both

I had this problem in version 3.1.2. Then I rolled back to the3.1.0 and the problem has solved.

@Mikhail-Zex I tried using double quotes, but it shows Searching for song "'Hello" and continues to download that song, and not resume download.

Use either single or double quotes, not both

I had this problem in version 3.1.2. Then I rolled back to the3.1.0 and the problem has solved.

3.1.0 and 3.1.2 are the same things, I just bumped up the number because I messed the PyPi upload 2 times.

Sry about messing up your comment, github android has some issues

Do you mean 3.1.0 or the release tagged 3.1.0-alpha on git

Do you mean 3.1.0 or the release tagged 3.1.0-alpha on git

So it seems the problem is not the code.
3.1.0 from py-pip.

@Mikhail-Zex I tried using double quotes, but it shows Searching for song "'Hello" and continues to download that song, and not resume download.

Use either single or double quotes, not both

Cmon man I aint a noob like that馃槀, i have used spotdl "Hello There.spotdlTrackingFile" same thing, error.
Nvm it just worked now 馃槀

Eh? 3.1.0 was taken down wasn't it?

@Mikhail-Zex I tried using double quotes, but it shows Searching for song "'Hello" and continues to download that song, and not resume download.

Use either single or double quotes, not both

Cmon man I aint a noob like that馃槀, i have used spotdl "Hello There.spotdlTrackingFile" same thing, error.

What shell are you using? I'm guessing cmd or PS

Actually, try ".\Hello There.spotdltrackingfile"

Windows and shine other platforms take they're precedence operators very seriously

@Mikhail-Zex Oh I see, its fine now , how about making a GUI with this spotdl? I am more a tkinter guy but im wondering about getting pre-requisites of ffmpeg on the client system and also about python code for spotdl

Well there is a gui plan. Were building a whole framework from scratch. Wanna join in?

@Mikhail-Zex If it is tkinter I can help, as I said, still a beginner in python xp Anyways Good Luck!!

It ain't tinker, more of html-css-js and well, thanks a Lott.

@Mikhail-Zex Hi, again, please help me out here too, any idea why this error?

Fetching Playlist...
 83%|鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枆               |ETA: 23:30, 2.61min/songmultiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 47, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\download\downloader.py", line 104, in download_song
    on_progress_callback = displayManager.pytube_progress_hook
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\pytube\__main__.py", line 92, in __init__
    self.descramble()
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\patches\pyTube.py", line 149, in descramble
    self.player_config_args = get_ytplayer_config(self.watch_html)["args"]
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\patches\pyTube.py", line 241, in get_ytplayer_config
    raise RegexMatchError(
NameError: name 'RegexMatchError' is not defined
"""

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

Traceback (most recent call last):
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\nihaa\AppData\Local\Programs\Python\Python37-32\Scripts\spotdl.exe\__main__.py", line 7, in <module>
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\__main__.py", line 116, in console_entry_point
    downloader.download_multiple_songs(songObjList)
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\download\downloader.py", line 297, in download_multiple_songs
    for song in songObjList
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 276, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "c:\users\nihaa\appdata\local\programs\python\python37-32\lib\multiprocessing\pool.py", line 657, in get
    raise self._value
NameError: name 'RegexMatchError' is not defined

Regx error is due to pytube3, a dependency of spotdl. No fix, just resume download.

@Mikhail-Zex Okays, but wont it just download the current song, or will it continue downloading the whole playlist from where it got the error?

Continue from error

@Mikhail-Zex Thanks!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

loftwah picture loftwah  路  5Comments

marinabar picture marinabar  路  4Comments

GUI
adrcotfas picture adrcotfas  路  5Comments

b-rad15 picture b-rad15  路  4Comments

linusg picture linusg  路  6Comments