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

Error when importing M4B with gapless set to true. #90

Closed
SenorSmartyPants opened this issue May 19, 2022 · 2 comments
Closed

Error when importing M4B with gapless set to true. #90

SenorSmartyPants opened this issue May 19, 2022 · 2 comments

Comments

@SenorSmartyPants
Copy link

linuxserver.io

importing an M4B file with gapless attribute(pgap) set to true, mediafile generates an error. I encountered this error while testing Neurrone/beets-audible#15 but the stack trace does not touch on plugin. Perhaps this is related to the older version of mediafile installed? Latest version is 0.9.0


Expected Behavior

No error should occur if attribute is present.

Current Behavior

beet import -It .
Traceback (most recent call last):
  File "/usr/bin/beet", line 33, in <module>
    sys.exit(load_entry_point('beets==1.6.1', 'console_scripts', 'beet')())
  File "/usr/lib/python3.9/site-packages/beets/ui/__init__.py", line 1304, in main
    _raw_main(args)
  File "/usr/lib/python3.9/site-packages/beets/ui/__init__.py", line 1291, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/lib/python3.9/site-packages/beets/ui/commands.py", line 973, in import_func
    import_files(lib, paths, query)
  File "/usr/lib/python3.9/site-packages/beets/ui/commands.py", line 943, in import_files
    session.run()
  File "/usr/lib/python3.9/site-packages/beets/importer.py", line 340, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/lib/python3.9/site-packages/beets/util/pipeline.py", line 446, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "/usr/lib/python3.9/site-packages/beets/util/pipeline.py", line 260, in run
    msg = next(self.coro)
  File "/usr/lib/python3.9/site-packages/beets/importer.py", line 1320, in read_tasks
    yield from task_factory.tasks()
  File "/usr/lib/python3.9/site-packages/beets/importer.py", line 1145, in tasks
    tasks = self._create(self.album(paths, dirs))
  File "/usr/lib/python3.9/site-packages/beets/importer.py", line 1224, in album
    items = [item for item in items if item]
  File "/usr/lib/python3.9/site-packages/beets/importer.py", line 1224, in <listcomp>
    items = [item for item in items if item]
  File "/usr/lib/python3.9/site-packages/beets/importer.py", line 1273, in read_item
    return library.Item.from_path(path)
  File "/usr/lib/python3.9/site-packages/beets/library.py", line 606, in from_path
    i.read(path)
  File "/usr/lib/python3.9/site-packages/beets/library.py", line 718, in read
    value = getattr(mediafile, key)
  File "/config/.local/lib/python3.9/site-packages/mediafile-0.6.0-py3.9.egg/mediafile.py", line 1198, in __get__
    out = style.get(mediafile.mgfile)
  File "/config/.local/lib/python3.9/site-packages/mediafile-0.6.0-py3.9.egg/mediafile.py", line 487, in get
    return self.deserialize(self.fetch(mutagen_file))
  File "/config/.local/lib/python3.9/site-packages/mediafile-0.6.0-py3.9.egg/mediafile.py", line 494, in fetch
    return mutagen_file[self.key][0]
TypeError: 'bool' object is not subscriptable

Steps to Reproduce

  1. beet import -It gapless-set.m4b

Environment

OS:
CPU architecture: arm64
How docker service was installed:

armbian-config

Command used to create docker container (run/create/compose/screenshot)

  beets:
    image: lscr.io/linuxserver/beets:nightly
    container_name: beets
    environment:
      - TZ=${TZ}
      - PUID=${PUID}
      - PGID=100
    volumes:
      - /mnt/seagate4TB/appdata/beets:/config
      - /mnt/storage:/storage
    ports:
      - 8337:8337
    restart: unless-stopped

Docker logs

@SenorSmartyPants
Copy link
Author

I just tried pip install --upgrade mediafile to 0.9.0 and that did not resolve the error.

@SenorSmartyPants
Copy link
Author

Nevermind, cause of this error is not LSIO related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant