"can't sync to MPEG frame" when uploading certain tracks
Steps to reproduce
- Upload a (faulty?) track
What happens?
Import fails with the following error in the console:
Traceback (most recent call last):
File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/celery/app/trace.py", line 382, in trace_task
R = retval = fun(*args, **kwargs)
File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/celery/app/trace.py", line 641, in __protected_call__
return self.run(*args, **kwargs)
File "/srv/funkwhale/api/funkwhale_api/taskapp/celery.py", line 51, in inner
return function(*args, **kwargs)
File "/srv/funkwhale/api/funkwhale_api/music/tasks.py", line 191, in process_upload
m = metadata.Metadata(audio_file)
File "/srv/funkwhale/api/funkwhale_api/music/metadata.py", line 325, in __init__
self._file = kind(filething)
File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/mutagen/_util.py", line 148, in wrapper_func
return func(h, *args, **kwargs)
File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/mutagen/_file.py", line 298, in File
return Kind(fileobj, filename=filething.filename)
File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/mutagen/_file.py", line 49, in __init__
self.load(*args, **kwargs)
File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/mutagen/_util.py", line 140, in wrapper
return func(self, h, *args, **kwargs)
File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/mutagen/id3/_file.py", line 423, in load
self.info = self._Info(fileobj, offset)
File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/mutagen/_util.py", line 169, in wrapper
return func(*args, **kwargs)
File "/srv/funkwhale/virtualenv/lib/python3.5/site-packages/mutagen/mp3/__init__.py", line 403, in __init__
raise HeaderNotFoundError("can't sync to MPEG frame")
mutagen.mp3.HeaderNotFoundError: can't sync to MPEG frame
What is expected?
Import should succeed.
Context
Funkwhale version(s) affected: 0.18.3
Instance configuration: Non-docker, NGINX
I can provide one of the MP3s that are failing in private, if needed.