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

Uncaught mutagen exception when using beets. #105

Closed
lazka opened this issue Jul 4, 2014 · 9 comments
Closed

Uncaught mutagen exception when using beets. #105

lazka opened this issue Jul 4, 2014 · 9 comments
Labels

Comments

@lazka
Copy link
Member

@lazka lazka commented Jul 4, 2014

Originally reported by: Christoph Reiter (Bitbucket: lazka, GitHub: lazka)


From thephoen...@gmail.com on February 01, 2012 01:59:51

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: http://code.google.com/p/mutagen/issues/detail?id=105


@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From thephoen...@gmail.com on January 31, 2012 17:34:14

http://dl.dropbox.com/u/8696693/03.Welcome%20Home%20%28Sanitarium%29%20%28Metallica%20Cover%29.mp3 Since it's too large to attach via comment.
@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From adrian.sampson on January 31, 2012 17:21:10

Nick: It would probably be helpful for the Mutagen developers if you could include a copy of a file that causes this exception.
@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From reiter.christoph@gmail.com on February 02, 2012 14:50:08

patch: Handle broken sylt frames.

The frame in the file is missing all time stamps.

Attachment: broken_sylt_fix.patch

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From joe.wreschnig@gmail.com on February 01, 2012 00:32:03

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
@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From thephoen...@gmail.com on February 15, 2012 14:52:31

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
@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From adrian.sampson on February 15, 2012 14:59:38

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.
@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From thephoen...@gmail.com on February 15, 2012 14:52:53

No change after adding patch.
@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From reiter.christoph@gmail.com on July 25, 2012 08:42:25

This issue was closed by revision r125 .

Status: Fixed

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2014

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From thephoen...@gmail.com on February 15, 2012 15:32:48

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!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.