Scanners.bundle fails to read tags of .m4a file

I noticed that a .m4a file I got from mora.jp was returning Unknown Artist/Unknown Album with the following traceback. After replacing the supplied mutagen with version 1.42.0 from pypi, it read the tags successfully. I can provide the audio file if needed.

Traceback (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4b6101f87/Scanners.bundle/Contents/Resources/Common/AudioFiles.py", line 276, in getInfoFromTag
    tag = EasyMP4(filename)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4b6101f87/Scanners.bundle/Contents/Resources/Common/mutagen/__init__.py", line 84, in __init__
    self.load(filename, *args, **kwargs)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4b6101f87/Scanners.bundle/Contents/Resources/Common/mutagen/mp4.py", line 816, in load
    reraise(MP4MetadataError, err, sys.exc_info()[2])
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4b6101f87/Scanners.bundle/Contents/Resources/Common/mutagen/mp4.py", line 812, in load
    self.tags = self.MP4Tags(atoms, fileobj)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4b6101f87/Scanners.bundle/Contents/Resources/Common/mutagen/easymp4.py", line 37, in __init__
    self.__mp4 = MP4Tags(*args, **kwargs)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4b6101f87/Scanners.bundle/Contents/Resources/Common/mutagen/_util.py", line 144, in __init__
    super(DictProxy, self).__init__(*args, **kwargs)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4b6101f87/Scanners.bundle/Contents/Resources/Common/mutagen/__init__.py", line 42, in __init__
    self.load(*args, **kwargs)
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4b6101f87/Scanners.bundle/Contents/Resources/Common/mutagen/mp4.py", line 326, in load
    info[0](self, atom, data, *info[2:])
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4b6101f87/Scanners.bundle/Contents/Resources/Common/mutagen/mp4.py", line 580, in __parse_genre
    genre = cdata.short_be(data[16:18])
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-4b6101f87/Scanners.bundle/Contents/Resources/Common/mutagen/_util.py", line 168, in <lambda>
    short_be = staticmethod(lambda data: struct.unpack('>h', data)[0])
MP4MetadataError: unpack requires a string argument of length 2

No need thanks. All that is changing.
The Python element in the scanners is being replaced and moved internally to C++.
You will see a significant change here over the next release or two. (not positive about the timetable)

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.