Downloading fails on almost every song

See original GitHub issue
  • Using current version
  • Searched for similar issues

What is the purpose of your issue?

  • Feature Request
  • Bug
  • Question
  • Other

Description

The first song in a playlist text file downloaded fine, but the second song gives an error. Happens on nearly every single song I have tried.

Log

C:\Users\alani\Music\Spotify>spotdl --list="s(r)ad-girl.txt" -f "/home/alani/Music/Spotify/" --log-level=DEBUG
INFO: Checking and removing any duplicate tracks in reading s(r)ad-girl.txt
INFO: Overriding s(r)ad-girl.txt with unique tracks
INFO: Preparing to download 40 songs

DEBUG: Input song is a Spotify URL
DEBUG: Fetching metadata for given track URL
DEBUG: Fetching lyrics
DEBUG: {'album': {'album_type': 'album',
               'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/492I2sQFcHDcsZECYX25dE'},
                            'href': 'https://api.spotify.com/v1/artists/492I2sQFcHDcsZECYX25dE',
                            'id': '492I2sQFcHDcsZECYX25dE',
                            'name': 'Lala Lala',
                            'type': 'artist',
                            'uri': 'spotify:artist:492I2sQFcHDcsZECYX25dE'}],
               'external_urls': {'spotify': 'https://open.spotify.com/album/1L3vOmYMc8UHmTVDh52kvl'},
               'href': 'https://api.spotify.com/v1/albums/1L3vOmYMc8UHmTVDh52kvl',
               'id': '1L3vOmYMc8UHmTVDh52kvl',
               'images': [{'height': 640,
                           'url': 'https://i.scdn.co/image/6c1b74d3b29a277ea5e5d039a963a383ecc7c8db',
                           'width': 640},
                          {'height': 300,
                           'url': 'https://i.scdn.co/image/8803df11cd7071202b7341cc544ee2e0ffaffe41',
                           'width': 300},
                          {'height': 64,
                           'url': 'https://i.scdn.co/image/6c093b5da03183035ad45b635f317584f05dd1e9',
                           'width': 64}],
               'name': 'Sleepyhead',
               'release_date': '2016-10-25',
               'release_date_precision': 'day',
               'total_tracks': 11,
               'type': 'album',
               'uri': 'spotify:album:1L3vOmYMc8UHmTVDh52kvl'},
     'artists': [{'external_urls': {'spotify': 'https://open.spotify.com/artist/492I2sQFcHDcsZECYX25dE'},
                  'href': 'https://api.spotify.com/v1/artists/492I2sQFcHDcsZECYX25dE',
                  'id': '492I2sQFcHDcsZECYX25dE',
                  'name': 'Lala Lala',
                  'type': 'artist',
                  'uri': 'spotify:artist:492I2sQFcHDcsZECYX25dE'}],
     'copyright': '2016 Lala Lala',
     'disc_number': 1,
     'duration': 184.331,
     'explicit': False,
     'external_ids': {'isrc': 'TCACY1759424'},
     'external_urls': {'spotify': 'https://open.spotify.com/track/3RfywJemVyr2DOXxsaH7is'},
     'genre': 'Art Pop',
     'href': 'https://api.spotify.com/v1/tracks/3RfywJemVyr2DOXxsaH7is',
     'id': '3RfywJemVyr2DOXxsaH7is',
     'is_local': False,
     'lyrics': None,
     'name': 'Exorcism',
     'popularity': 34,
     'preview_url': 'https://p.scdn.co/mp3-preview/7bbd72545b23f93e0001cb3f1321a8896b708591?cid=4fe3fecfe5334023a1472516cc99d805',
     'publisher': 'Lala Lala',
     'release_date': '2016-10-25',
     'spotify_metadata': True,
     'total_tracks': 11,
     'track_number': 1,
     'type': 'track',
     'uri': 'spotify:track:3RfywJemVyr2DOXxsaH7is',
     'year': '2016'}
DEBUG: Opening URL: https://www.youtube.com/results?sp=EgIQAQ%253D%253D&q=Lala%20Lala%20-%20Exorcism%20lyrics
INFO: 1. Lala Lala - Exorcism (http://www.youtube.com/watch?v=PPtCAOOaiwM)
DEBUG: Refining songname from "Lala Lala - Exorcism" to "Lala Lala - Exorcism"
DEBUG: Cleaning any temp files and checking if "Lala Lala - Exorcism" already exists
DEBUG: Found an already existing song: "Lala Lala - Exorcism.m4a"
Traceback (most recent call last):
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\mp4\__init__.py", line 931, in load
    moov = atoms[b"moov"]
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\mp4\_atom.py", line 194, in __getitem__
    raise KeyError("%r not found" % names[0])
KeyError: "b'moov' not found"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\alani\AppData\Local\Programs\Python\Python37-32\Scripts\spotdl.exe\__main__.py", line 9, in <module>
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\spotdl.py", line 63, in main
    match_args()
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\spotdl.py", line 39, in match_args
    list_dl.download_list()
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\downloader.py", line 199, in download_list
    return self._download_list()
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\downloader.py", line 208, in _download_list
    track_dl.download_single()
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\downloader.py", line 118, in download_single
    if not song_existence.already_exists(self.raw_song):
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\downloader.py", line 36, in already_exists
    if internals.is_spotify(raw_song) and not self._has_metadata(song):
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\downloader.py", line 58, in _has_metadata
    os.path.join(self.filepath, song), self.meta_tags
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\spotdl\metadata.py", line 20, in compare
    audiofile = MP4(music_file)
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\_file.py", line 49, in __init__
    self.load(*args, **kwargs)
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\_util.py", line 140, in wrapper
    return func(self, h, *args, **kwargs)
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\mp4\__init__.py", line 1061, in load
    self.info.load(atoms, fileobj)
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\_util.py", line 169, in wrapper
    return func(*args, **kwargs)
  File "c:\users\alani\appdata\local\programs\python\python37-32\lib\site-packages\mutagen\mp4\__init__.py", line 933, in load
    raise MP4StreamInfoError("not a MP4 file")
mutagen.mp4.MP4StreamInfoError: not a MP4 file

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
CopyPasteFailcommented, Jul 5, 2019

Update v1.2.1 i got error in pafy, i’m already update the pafy but still error image

Edit : Solved by updating youtube-dl Thanks Same here: pip install --upgrade youtube-dl

2reactions
ritiekcommented, Mar 13, 2019

It seems like the tool is having trouble checking for already existing files (corrupted .m4a downloads? idk). Could you try downloading tracks to a different directory with debug logging enabled? If these errors still occur, post the output here. I’ll see if I can narrow down the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Does My Download Stop Before It is Finished?
One solution is to clear the temporary Internet files under the History section in your browser and try the download again.
Read more >
How to Fix iTunes Download Error Tap to Retry - FoneDog
Open iTunes and connect your iOS device using a USB cable. Go to Store, scroll down and find Purchased. Click Available Downloads. Download...
Read more >
Unable to download item please try again … - Apple Community
I keep getting the error pop up that states “Unable to download Item, please try again later” options of “done or retry”. I...
Read more >
Resolving the “Unable to Download Item. Please Try Again ...
A somewhat strange error message can occur at random on iOS, typically for iPhone users, that states “Unable to Download Item.
Read more >
Fix file download errors - Google Chrome Help
If you get an error message on Chrome when you try to download apps, themes, extensions, or other files, try these fixes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found