forked from tmerten/spotify-ripper
-
Notifications
You must be signed in to change notification settings - Fork 22
Mutagen Exception for skipping files in URI list file #32
Copy link
Copy link
Open
Description
So, as I tried the workaround for the workaround as suggested by @ramonskie in #25 (comment)_ (and it worked, thanks! 🙌 ), I could use a uri_list.txt successfully.
Now the process was aborted due to a wifi error locally, and now I can't restart the process in the same directory. I get the error below:
Exception in thread SpotifyRipperThread:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/site-packages/spotify_ripper/ripper.py", line 241, in run
self.progress.calc_total(all_tracks)
File "/usr/local/lib/python3.7/site-packages/spotify_ripper/progress.py", line 76, in calc_total
not is_partial(audio_file, track):
File "/usr/local/lib/python3.7/site-packages/spotify_ripper/utils.py", line 446, in is_partial
audio_file_dur = audio_file_duration(audio_file)
File "/usr/local/lib/python3.7/site-packages/spotify_ripper/utils.py", line 441, in audio_file_duration
_file = mutagen.File(audio_file)
File "/usr/local/lib/python3.7/site-packages/mutagen/_file.py", line 235, in File
return Kind(filename)
File "/usr/local/lib/python3.7/site-packages/mutagen/_file.py", line 41, in __init__
self.load(filename, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/mutagen/id3/__init__.py", line 1084, in load
self.info = self._Info(fileobj, offset)
File "/usr/local/lib/python3.7/site-packages/mutagen/mp3.py", line 185, in __init__
self.__try(fileobj, offset, size - offset, False)
File "/usr/local/lib/python3.7/site-packages/mutagen/mp3.py", line 223, in __try
raise HeaderNotFoundError("can't sync to an MPEG frame")
mutagen.mp3.HeaderNotFoundError: can't sync to an MPEG frame
If I trigger the action in a blank directory without files, it works perfectly (but downloads all files again..). Any idea how this error can happen and could be prevented?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels