FS#45920 - [beets] 1.3.14-1 Missing optional deps for thumbnail plugin

Attached to Project: Community Packages
Opened by Beau Breon (rnd) - Friday, 07 August 2015, 20:21 GMT
Last edited by Maxime Gauduin (Alucryd) - Saturday, 08 August 2015, 07:36 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Maxime Gauduin (Alucryd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

With the attached configuration file written to ~/.config/beets/config.yaml executing the beet command creates the following error:

$ beet --version
** error loading plugin thumbnails:
Traceback (most recent call last):
File "/home/rnd/.virtualenvs/beets/lib/python2.7/site-packages/beets/plugins.py", line 254, in load_plugins
namespace = __import__(modname, None, None)
File "/home/rnd/.virtualenvs/beets/lib/python2.7/site-packages/beetsplug/thumbnails.py", line 29, in <module>
from pathlib import PurePosixPath
ImportError: No module named pathlib

beets version 1.3.14
no plugins loaded

To resolve this I installed python2-pathlib.

While troubleshooting this for this bug report I had installed it manually in a virtualenv and continued to get another error:

$ beet --version
** error loading plugin thumbnails:
Traceback (most recent call last):
File "/home/rnd/.virtualenvs/beets/lib/python2.7/site-packages/beets/plugins.py", line 254, in load_plugins
namespace = __import__(modname, None, None)
File "/home/rnd/.virtualenvs/beets/lib/python2.7/site-packages/beetsplug/thumbnails.py", line 33, in <module>
from xdg import BaseDirectory
ImportError: No module named xdg

beets version 1.3.14
no plugins loaded

I solved this by installing python2-xdg (via $VIRTUALENV/bin/pip install pyxdg) and now it works without errors:

$ beet --version
beets version 1.3.14
plugins: thumbnails

Steps to reproduce:

To reproduce make sure that python2-pathlib and/or python2-xdg is not installed, install beets and enable the thumbnail plugin using the attached configuration file.

It would seem these two packages should be added as optional dependencies for the thumbnails plugin:

python2-pathlib
python2-xdg
This task depends upon

Closed by  Maxime Gauduin (Alucryd)
Saturday, 08 August 2015, 07:36 GMT
Reason for closing:  Fixed
Additional comments about closing:  1.3.14-2
Comment by Maxime Gauduin (Alucryd) - Saturday, 08 August 2015, 07:34 GMT
So many plugins, this package will soon be breaking the optdeps record! Added both, as well as ImageMagick for image resizing, it was either that or PIL (well, pillow), but IM is checked for first in the code so let's go with that one.

Loading...