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

Beets crashes when importing library #4835

Closed
Kaduo opened this issue Jun 30, 2023 · 5 comments
Closed

Beets crashes when importing library #4835

Kaduo opened this issue Jun 30, 2023 · 5 comments
Labels
bug bugs that are confirmed and actionable

Comments

@Kaduo
Copy link

Kaduo commented Jun 30, 2023

Problem

Running:

$ beet import /my/music/library

...works fine until it encounters a problem album that it cannot find in MusicBrainz. After providing the MusicBrainz id (it's a 89%-something match), it wants to modify a couple of filenames, then no matter what option I choose (be it Apply or Use as is), I get the following error:

Traceback (most recent call last):
  File "/mnt/mpathag/hencemachine/virtualenv/bin/beet", line 8, in <module>
    sys.exit(main())
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/ui/__init__.py", line 1301, in main
    _raw_main(args)
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/ui/__init__.py", line 1288, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/ui/commands.py", line 1037, in import_func
    import_files(lib, paths, query)
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/ui/commands.py", line 977, in import_files
    session.run()
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/importer.py", line 345, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/util/pipeline.py", line 446, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/util/pipeline.py", line 311, in run
    out = self.coro.send(msg)
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/util/pipeline.py", line 193, in coro
    func(*(args + (task,)))
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/importer.py", line 1436, in lookup_candidates
    task.lookup_candidates()
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/importer.py", line 666, in lookup_candidates
    autotag.tag_album(self.items, search_ids=self.search_ids)
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/autotag/match.py", line 512, in tag_album
    for matched_candidate in hooks.album_candidates(items,
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/plugins.py", line 573, in decorated
    for v in generator(*args, **kwargs):
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/autotag/hooks.py", line 699, in album_candidates
    yield from invoke_mb(mb.match_album, artist, album, len(items),
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/autotag/mb.py", line 633, in match_album
    albuminfo = album_for_id(release['id'])
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/autotag/mb.py", line 750, in album_for_id
    actual_res = _find_actual_release_from_pseudo_release(res)
  File "/mnt/mpathag/hencemachine/virtualenv/lib/python3.10/site-packages/beets/autotag/mb.py", line 681, in _find_actual_release_from_pseudo_release
    relations = pseudo_rel['release']["release-relation-list"]
KeyError: 'release-relation-list'

This isn't specific to a particular album, any album that beets doesn't instantly recognize as a 100% match seems to give me this issue.

Setup

  • OS: Gentoo Linux
  • Python version: 3.10.12
  • beets version: 1.6.1
  • Turning off plugins made problem go away (yes/no): no

My configuration (output of beet config) is:

import:
    copy: no
    write: no
@arsaboo
Copy link
Contributor

arsaboo commented Jun 30, 2023

Looks like this was introduced by #4714
@TypicalFence can you take a look?

@jackwilsdon
Copy link
Member

#4834 already appears to be open to fix this.

@jackwilsdon jackwilsdon added the bug bugs that are confirmed and actionable label Jun 30, 2023
@Kaduo
Copy link
Author

Kaduo commented Jun 30, 2023

#4834 already appears to be open to fix this.

I confirm that this fixes the bug!

@TypicalFence
Copy link
Contributor

@jackwilsdon I think this was already fixed in #4833

@arsaboo
Copy link
Contributor

arsaboo commented Jul 9, 2023

Can we please close this as this is fixed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs that are confirmed and actionable
Projects
None yet
Development

No branches or pull requests

5 participants