Description
I was using migrate-from-google-play-music and it crashed in Mutagen.
It turns out it was dying on a mystery 79 kB amazon.temp
file from 2013 in my Music folder hierarchy left over, I believe, from an Amazon MP3 album download. I only found two mentions of this filename in a light Google search, but they were both in similar MP3 directory listings. I can reproduce the crash with just mutagen.File()
(version 1.45.1 I think), so I'm reporting here as well.
file
(1) reports "amazon.temp: Audio file with ID3 version 2.3.0", so I guess that's enough for Mutagen to try reading the file and then die. Both vlc and ffmpeg give errors processing the file.
It would be nice if Mutagen was robust to unexpected input files, though this seems exceedingly rare.
I can supply the amazon.temp
file if it will help, but I have to do it privately in case it contains Amazon account info.
>>> import mutagen
>>> mutagen.File("/media/Windows/Users/spage/Music/Media/Vienna Teng/Waking Hour/amazon.temp")
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/mutagen/_util.py", line 185, in wrapper
return func(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/_util.py", line 156, in wrapper
return func(self, h, *args, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/id3/_file.py", line 170, in load
data = read_full(fileobj, self.size - 10)
File "/usr/lib/python3.9/site-packages/mutagen/_util.py", line 657, in read_full
raise IOError
OSError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.9/site-packages/mutagen/_util.py", line 164, in wrapper_func
return func(h, *args, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/_file.py", line 301, in File
return Kind(fileobj, filename=filething.filename)
File "/usr/lib/python3.9/site-packages/mutagen/_file.py", line 48, in __init__
self.load(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/_util.py", line 156, in wrapper
return func(self, h, *args, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/id3/_file.py", line 409, in load
self.tags = ID3(fileobj, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/id3/_file.py", line 77, in __init__
super(ID3, self).__init__(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/id3/_tags.py", line 173, in __init__
super(ID3Tags, self).__init__(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/_util.py", line 534, in __init__
super(DictProxy, self).__init__(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/_tags.py", line 111, in __init__
self.load(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/_util.py", line 189, in wrapper
reraise(exc_dest, err, sys.exc_info()[2])
File "/usr/lib/python3.9/site-packages/mutagen/_util.py", line 43, in reraise
raise tp(value).with_traceback(tb)
File "/usr/lib/python3.9/site-packages/mutagen/_util.py", line 185, in wrapper
return func(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/_util.py", line 156, in wrapper
return func(self, h, *args, **kwargs)
File "/usr/lib/python3.9/site-packages/mutagen/id3/_file.py", line 170, in load
data = read_full(fileobj, self.size - 10)
File "/usr/lib/python3.9/site-packages/mutagen/_util.py", line 657, in read_full
raise IOError
mutagen.id3._util.error