snejus / beetcamp

Bandcamp autotagger source for beets (https://beets.io)
GNU General Public License v2.0
67 stars 13 forks source link

KeyError #5

Closed noahsager closed 3 years ago

noahsager commented 3 years ago

Seeing this when I try to import Bandcamp albums:

   ~  beet import /Users/noah/Music/beets\ Import/                        ✔ 
bandcamp: Searching albums for sketches of home ep
bandcamp: Page 1
Traceback (most recent call last):
  File "/usr/local/bin/beet", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/beets/ui/__init__.py", line 1278, in main
    _raw_main(args)
  File "/usr/local/lib/python3.9/site-packages/beets/ui/__init__.py", line 1265, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/local/lib/python3.9/site-packages/beets/ui/commands.py", line 960, in import_func
    import_files(lib, paths, query)
  File "/usr/local/lib/python3.9/site-packages/beets/ui/commands.py", line 930, in import_files
    session.run()
  File "/usr/local/lib/python3.9/site-packages/beets/importer.py", line 341, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/local/lib/python3.9/site-packages/beets/util/pipeline.py", line 445, in run_parallel
    six.reraise(exc_info[0], exc_info[1], exc_info[2])
  File "/usr/local/lib/python3.9/site-packages/six.py", line 703, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/beets/util/pipeline.py", line 312, in run
    out = self.coro.send(msg)
  File "/usr/local/lib/python3.9/site-packages/beets/util/pipeline.py", line 194, in coro
    func(*(args + (task,)))
  File "/usr/local/lib/python3.9/site-packages/beets/importer.py", line 1365, in lookup_candidates
    task.lookup_candidates()
  File "/usr/local/lib/python3.9/site-packages/beets/importer.py", line 653, in lookup_candidates
    autotag.tag_album(self.items, search_ids=self.search_ids)
  File "/usr/local/lib/python3.9/site-packages/beets/autotag/match.py", line 463, in tag_album
    for matched_candidate in hooks.album_candidates(items,
  File "/usr/local/lib/python3.9/site-packages/beets/plugins.py", line 582, in decorated
    for v in generator(*args, **kwargs):
  File "/usr/local/lib/python3.9/site-packages/beets/autotag/hooks.py", line 631, in album_candidates
    for candidate in plugins.candidates(items, artist, album, va_likely,
  File "/usr/local/lib/python3.9/site-packages/beets/plugins.py", line 391, in candidates
    for candidate in plugin.candidates(items, artist, album, va_likely,
  File "/Users/noah/Library/Python/3.9/lib/python/site-packages/beetsplug/bandcamp/__init__.py", line 215, in get_album_info
    return Metaguru(html, self.media).album if html else None
  File "/Users/noah/Library/Python/3.9/lib/python/site-packages/beetsplug/bandcamp/_metaguru.py", line 341, in album
    media = _format["musicReleaseFormat"]
KeyError: 'musicReleaseFormat'
snejus commented 3 years ago

Thanks! This now should be handled in 0.4.3.