leosongwei / mutagen

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

Exception thown: "struct.error: unpack requires a string argument of length 12" usinf File on a m4a (mutagen 1.20) #119

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Stack:

Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from mutagen import File
>>> f = File("/Users/mickael/Music/iTunes/iTunes Media/Music/Tony 
Lionni/Timeless EP/03 The Prophet.m4a")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mutagen-1.20-py2.7.egg/mutagen/__init__.py", line 216, in File
    if score > 0: return Kind(filename)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mutagen-1.20-py2.7.egg/mutagen/__init__.py", line 75, in __init__
    self.load(filename, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mutagen-1.20-py2.7.egg/mutagen/mp4.py", line 663, in load
    try: self.tags = self.MP4Tags(atoms, fileobj)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mutagen-1.20-py2.7.egg/mutagen/_util.py", line 105, in __init__
    super(DictProxy, self).__init__(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mutagen-1.20-py2.7.egg/mutagen/__init__.py", line 39, in __init__
    self.load(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mutagen-1.20-py2.7.egg/mutagen/mp4.py", line 251, in load
    info[0](self, atom, data, *info[2:])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mutagen-1.20-py2.7.egg/mutagen/mp4.py", line 529, in __parse_text
    in self.__parse_data(atom, data)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mutagen-1.20-py2.7.egg/mutagen/mp4.py", line 411, in __parse_data
    length, name, flags = struct.unpack(">I4sI", data[pos:pos+12])
struct.error: unpack requires a string argument of length 12
>>> 

I can provide the music file if this is useful. However, it seems that any m4a 
from the itunes store will do.

Original issue reported on code.google.com by desfrenes on 13 Aug 2012 at 12:48

GoogleCodeExporter commented 9 years ago
Please send me the file (no itunes..)

Original comment by reiter.christoph@gmail.com on 13 Aug 2012 at 1:36

GoogleCodeExporter commented 9 years ago
This now fails controlled: revision 1d88504d333f

Please provide an affected file if you want the loading to get fixed.

Original comment by reiter.christoph@gmail.com on 2 Apr 2013 at 4:37

GoogleCodeExporter commented 9 years ago
Here is the file: http://www.desfrenes.com/fault.m4a

Original comment by desfrenes on 3 Apr 2013 at 7:42

GoogleCodeExporter commented 9 years ago
Thanks

Original comment by reiter.christoph@gmail.com on 3 Apr 2013 at 4:17

GoogleCodeExporter commented 9 years ago
mutagen has moved to Bitbucket: https://bitbucket.org/lazka/mutagen/issue/119

Original comment by reiter.christoph@gmail.com on 4 Jul 2014 at 3:38