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

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

Closed
lazka opened this issue Jul 4, 2014 · 5 comments
Labels
bug

Comments

@lazka
Copy link
Member

@lazka lazka commented Jul 4, 2014

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


From desfrenes on August 13, 2012 14:48:05

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


@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 April 02, 2013 09:37:15

This now fails controlled: revision 1d88504d333f Please provide an affected file if you want the loading to get fixed.

Status: WontFix

@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 August 13, 2012 06:36:51

Please send me the file (no itunes..)

Status: Accepted

@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 desfrenes on April 03, 2013 00:42:42

Here is the file: http://www.desfrenes.com/fault.m4a
@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 April 03, 2013 09:17:33

Thanks

Status: Accepted
Labels: -Type-Enhancement Type-Defect

@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Sep 26, 2014

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


mp4: handle more parsing error cases. (Fixes issue #119)

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.