Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutagen Exception for skipping files in URI list file #32

Open
cukabeka opened this issue Jan 21, 2019 · 0 comments
Open

Mutagen Exception for skipping files in URI list file #32

cukabeka opened this issue Jan 21, 2019 · 0 comments

Comments

@cukabeka
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant