leosongwei / mutagen

Automatically exported from code.google.com/p/mutagen
GNU General Public License v2.0
0 stars 0 forks source link

Uncaught mutagen exception when using beets. #105

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
http://pastie.org/3291722

I wasn't sure where to report this and the person developing beets told me to 
report the issue here.  It outputs unreadable files and gives me that exception 
error.

More info can be retrieved if necessary.

Original issue reported on code.google.com by thephoen...@gmail.com on 1 Feb 2012 at 12:59

GoogleCodeExporter commented 9 years ago
Nick: It would probably be helpful for the Mutagen developers if you could 
include a copy of a file that causes this exception.

Original comment by adrian.sampson on 1 Feb 2012 at 1:21

GoogleCodeExporter commented 9 years ago
http://dl.dropbox.com/u/8696693/03.Welcome%20Home%20%28Sanitarium%29%20%28Metall
ica%20Cover%29.mp3

Since it's too large to attach via comment.

Original comment by thephoen...@gmail.com on 1 Feb 2012 at 1:34

GoogleCodeExporter commented 9 years ago
uncaught Mutagen exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/beets/mediafile.py", line 681, in __init__
    self.mgfile = mutagen.File(path)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 216, in File
    if score > 0: return Kind(filename)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 75, in __init__
    self.load(filename, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1995, in load
    try: self.tags = ID3(filename, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 74, in __init__
    super(ID3, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/_util.py", line 105, in __init__
    super(DictProxy, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 39, in __init__
    self.load(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 136, in load
    for frame in self.__read_frames(data, frames=frames):
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 312, in __read_frames
    try: yield self.__load_framedata(tag, flags, framedata)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 335, in __load_framedata
    return tag.fromData(self, flags, framedata)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1080, in fromData
    frame._readData(data)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1013, in _readData
    try: value, data = reader.read(self, data)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 876, in read
    time, = struct.unpack(">I", data[value_idx+l:value_idx+l+4])
error: unpack requires a string argument of length 4

This album is already in the library!
unreadable file: 03.Welcome Home (Sanitarium) (Metallica Cover).mp3

/home/shadows/Music/Avenged Seven Discography.mp3/Nightmare
Skipping.

/home/shadows/Music/Avenged Seven Discography.mp3/Sounding the Seventh Trumpet
Tagging: Avenged Sevenfold - Sounding the Seventh Trumpet
(Similarity: 100.0%)
uncaught Mutagen exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/beets/mediafile.py", line 681, in __init__
    self.mgfile = mutagen.File(path)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 216, in File
    if score > 0: return Kind(filename)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 75, in __init__
    self.load(filename, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1995, in load
    try: self.tags = ID3(filename, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 74, in __init__
    super(ID3, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/_util.py", line 105, in __init__
    super(DictProxy, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 39, in __init__
    self.load(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 136, in load
    for frame in self.__read_frames(data, frames=frames):
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 312, in __read_frames
    try: yield self.__load_framedata(tag, flags, framedata)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 335, in __load_framedata
    return tag.fromData(self, flags, framedata)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1080, in fromData
    frame._readData(data)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1013, in _readData
    try: value, data = reader.read(self, data)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 876, in read
    time, = struct.unpack(">I", data[value_idx+l:value_idx+l+4])
error: unpack requires a string argument of length 4

unreadable file: 01 Your Betrayal.mp3

Original comment by joe.wreschnig@gmail.com on 1 Feb 2012 at 8:32

GoogleCodeExporter commented 9 years ago
patch: Handle broken sylt frames.

The frame in the file is missing all time stamps.

Original comment by reiter.christoph@gmail.com on 2 Feb 2012 at 10:50

Attachments:

GoogleCodeExporter commented 9 years ago
unreadable file: 07 Too Bad.mp3
uncaught Mutagen exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/beets/mediafile.py", line 681, in __init__
    self.mgfile = mutagen.File(path)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 216, in File
    if score > 0: return Kind(filename)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 75, in __init__
    self.load(filename, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1995, in load
    try: self.tags = ID3(filename, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 74, in __init__
    super(ID3, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/_util.py", line 105, in __init__
    super(DictProxy, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 39, in __init__
    self.load(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 136, in load
    for frame in self.__read_frames(data, frames=frames):
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 312, in __read_frames
    try: yield self.__load_framedata(tag, flags, framedata)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 335, in __load_framedata
    return tag.fromData(self, flags, framedata)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1080, in fromData
    frame._readData(data)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1013, in _readData
    try: value, data = reader.read(self, data)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 876, in read
    time, = struct.unpack(">I", data[value_idx+l:value_idx+l+4])
error: unpack requires a string argument of length 4

unreadable file: Black Sabbath (07) Valhalla.mp3
uncaught Mutagen exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/beets/mediafile.py", line 681, in __init__
    self.mgfile = mutagen.File(path)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 216, in File
    if score > 0: return Kind(filename)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 75, in __init__
    self.load(filename, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1995, in load
    try: self.tags = ID3(filename, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 74, in __init__
    super(ID3, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/_util.py", line 105, in __init__
    super(DictProxy, self).__init__(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/__init__.py", line 39, in __init__
    self.load(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 136, in load
    for frame in self.__read_frames(data, frames=frames):
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 312, in __read_frames
    try: yield self.__load_framedata(tag, flags, framedata)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 335, in __load_framedata
    return tag.fromData(self, flags, framedata)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1080, in fromData
    frame._readData(data)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 1013, in _readData
    try: value, data = reader.read(self, data)
  File "/usr/local/lib/python2.7/dist-packages/mutagen/id3.py", line 876, in read
    time, = struct.unpack(">I", data[value_idx+l:value_idx+l+4])
error: unpack requires a string argument of length 4

Original comment by thephoen...@gmail.com on 15 Feb 2012 at 10:52

GoogleCodeExporter commented 9 years ago
No change after adding patch.

Original comment by thephoen...@gmail.com on 15 Feb 2012 at 10:52

GoogleCodeExporter commented 9 years ago
The patch has clearly not been applied to your installed version of Mutagen. 
(If it had been applied, the line number of that struct.unpack call would have 
changed -- i.e., increased by 2.)

Visually inspect the modified file 
(/usr/local/lib/python2.7/dist-packages/mutagen/id3.py) before concluding that 
the patch has been applied.

Original comment by adrian.sampson on 15 Feb 2012 at 10:59

GoogleCodeExporter commented 9 years ago
You are right, the patch had failed to apply even it said it worked, reapplied 
to Mutagen source and everything is good to go, thank you!

Original comment by thephoen...@gmail.com on 15 Feb 2012 at 11:32

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r125.

Original comment by reiter.christoph@gmail.com on 25 Jul 2012 at 3:42