spotify-downloader: Different errors each time

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!!

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 29

Most upvoted comments

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