beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.78k stars 1.82k forks source link

Fetchart?: empty album #1536

Closed hrehfeld closed 8 years ago

hrehfeld commented 9 years ago
$ beet import path
Traceback (most recent call last):
  File "/usr/bin/beet", line 9, in <module>
    load_entry_point('beets==1.3.14', 'console_scripts', 'beet')()
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 1140, in main
    _raw_main(args)
  File "/usr/lib/python2.7/site-packages/beets/ui/__init__.py", line 1130, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/usr/lib/python2.7/site-packages/beets/ui/commands.py", line 881, in import_func
    import_files(lib, paths, query)
  File "/usr/lib/python2.7/site-packages/beets/ui/commands.py", line 858, in import_files
    session.run()
  File "/usr/lib/python2.7/site-packages/beets/importer.py", line 316, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/usr/lib/python2.7/site-packages/beets/util/pipeline.py", line 347, in run
    self.coro.send(msg)
  File "/usr/lib/python2.7/site-packages/beets/util/pipeline.py", line 160, in coro
    task = func(*(args + (task,)))
  File "/usr/lib/python2.7/site-packages/beets/importer.py", line 1376, in manipulate_files
    session=session,
  File "/usr/lib/python2.7/site-packages/beets/importer.py", line 677, in manipulate_files
    plugins.send('import_task_files', session=session, task=self)
  File "/usr/lib/python2.7/site-packages/beets/plugins.py", line 458, in send
    result = handler(**arguments)
  File "/usr/lib/python2.7/site-packages/beets/plugins.py", line 123, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/beetsplug/fetchart.py", line 399, in assign_art
    album.set_art(path, not src_removed)
  File "/usr/lib/python2.7/site-packages/beets/library.py", line 1067, in set_art
    artdest = self.art_destination(path)
  File "/usr/lib/python2.7/site-packages/beets/library.py", line 1043, in art_destination
    item_dir = item_dir or self.item_dir()
  File "/usr/lib/python2.7/site-packages/beets/library.py", line 1009, in item_dir
    raise ValueError('empty album')
ValueError: empty album
fail  ~

$ pacman -Qi beets-git 
Name           : beets-git
Version        : 1.3.13.r93.gce91a0c-1
Description    : Flexible music library manager and tagger - git version
Architecture   : any
URL            : http://beets.radbox.org/
Licenses       : MIT
Groups         : None
Provides       : beets
Depends On     : python2-munkres  mutagen  python2-setuptools  python2-unidecode  python2-musicbrainzngs
                 python2-yaml  python2-enum34  python2-jellyfish
Optional Deps  : python2-pyacoustid: acoustic fingerprinting [installed]
                 python2-flask: web interface [installed]
                 gstreamer0.10-python: BPD audio player plugin
                 python2-pylast: lastgenre plugin [installed]
Required By    : beets-check-git  beets-copyartifacts-git
Optional For   : None
Conflicts With : beets
Replaces       : None
Installed Size :   3.12 MiB
Packager       : Unknown Packager
Build Date     : Tue 23 Jun 2015 12:49:19 PM CEST
Install Date   : Tue 23 Jun 2015 12:49:24 PM CEST
Install Reason : Explicitly installed
Install Script : No
Validated By   : None
sampsyo commented 9 years ago

Can you remove the album in question? We should avoid empty albums, but sometimes things do go wrong (usually due to aborted import sessions). Shouldn't happen again.

hrehfeld commented 9 years ago

The problem is that I don't know which album it is. I'm doing a full re-import, and I didn't see the name printed.

sampsyo commented 9 years ago

Agh, that's a drag. Does verbose mode help?

nedson commented 9 years ago

I have also had that error. Is it caused by a directory with no files? I looked at the offending album and see that it does contain two songs (it is a single).

When aborting an import I have been deleting the database file. Are there other files I should delete before running another import?

sampsyo commented 9 years ago

No, it's not caused by empty directories. And no, you should not need to delete anything else. In fact, you should not need to delete the database file; that would be considered a bug. :cry:

sampsyo commented 8 years ago

I'll need to close this ticket for now since we're having trouble reproducing it. Please do reopen it if you have any other information that can help us reproduce it.

lbesnard commented 7 years ago

I've came across the same bug with beets version 1.4.3 while importing a big collection. Unfortunately, there was no empty directory/file recursively. I had to remove the fetchart plugin to make the import work properly.

sampsyo commented 7 years ago

Hi! Can you help us reproduce the bug with full details?

lbesnard commented 7 years ago

definitely. I'll try debug it a bit more early next week