Singleton mode crashes everytime

Hello there,

When trying to import a song in singleton mode, I get a crash everytime. This is what happens:

$> beet imp -s song_name.mp3

Result:

Traceback (most recent call last):
  File "/usr/local/bin/beet", line 33, in <module>
    sys.exit(load_entry_point('beets==1.5.0', 'console_scripts', 'beet')())
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/ui/__init__.py", line 1267, in main
    _raw_main(args)
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/ui/__init__.py", line 1254, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/ui/commands.py", line 956, in import_func
    import_files(lib, paths, query)
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/ui/commands.py", line 926, in import_files
    session.run()
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/importer.py", line 329, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/util/pipeline.py", line 445, in run_parallel
    six.reraise(exc_info[0], exc_info[1], exc_info[2])
  File "/Users/dcfelix/Library/Python/3.8/lib/python/site-packages/six.py", line 703, in reraise
    raise value
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/util/pipeline.py", line 312, in run
    out = self.coro.send(msg)
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/util/pipeline.py", line 194, in coro
    func(*(args + (task,)))
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/importer.py", line 1353, in lookup_candidates
    task.lookup_candidates()
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/importer.py", line 894, in lookup_candidates
    prop = autotag.tag_item(self.item, search_ids=self.search_ids)
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/autotag/match.py", line 520, in tag_item
    for track_info in hooks.item_candidates(item, search_artist, search_title):
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/plugins.py", line 577, in decorated
    for v in generator(*args, **kwargs):
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/autotag/hooks.py", line 652, in item_candidates
    for candidate in plugins.item_candidates(item, artist, title):
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/plugins.py", line 395, in item_candidates
    for item_candidate in plugin.item_candidates(item, artist, title):
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/plugins.py", line 757, in item_candidates
    return [self.track_for_id(track_data=track) for track in tracks]
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beets/plugins.py", line 757, in <listcomp>
    return [self.track_for_id(track_data=track) for track in tracks]
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beetsplug/deezer.py", line 159, in track_for_id
    track = self._get_track(track_data)
  File "/usr/local/lib/python3.8/site-packages/beets-1.5.0-py3.8.egg/beetsplug/deezer.py", line 134, in _get_track
    index=track_data['track_position'],
KeyError: 'track_position'

Could you try disabling the deezer plugin and running again?

If that works does the deezer plugin work for singletons? You would need to check with the author.

1 Like

That was the problem. Thanks for the help.

It seems the deezer plugin does not work for singletons.