beetbox / beets

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

More Python modules are needed than are stated in the wiki #3451

Closed govynnus closed 4 years ago

govynnus commented 4 years ago

I've been thinking recently about trying to improve the web UI, but when I forked the repo to have a look at the code I ran across some (minor) problems. In short I think that the Hacking page in the wiki is a bit out of date in terms of the Python modules you need to install manually: it doesn't list confuse, mediafile or jellyfish.

I'm running Python 3.8.0 in a venv which contains the repository. I installed the modules stated on the Hacking page with python -m pip install mutagen munkres unidecode pyYAML musicbrainzngs. Then modules for plugins I have enabled with python -m pip install discogs-client requests, flask

When I ran ./beet I got the following error:

Traceback (most recent call last):
   File "./beet", line 20, in <module>
     import beets.ui
   File "/home/callum/code/git-repos/beets/beets/beets/__init__.py", line 20, in <module>
     import confuse
ModuleNotFoundError: No module named 'confuse'

After installing confuse:

Traceback (most recent call last):
   File "./beet", line 20, in <module>
     import beets.ui
   File "/home/callum/code/git-repos/beets/beets/beets/ui/__init__.py", line 36, in <module>
     from beets import library
   File "/home/callum/code/git-repos/beets/beets/beets/library.py", line 29, in <module>
     from mediafile import MediaFile, UnreadableFileError
ModuleNotFoundError: No module named 'mediafile'

After installing mediafile:

Traceback (most recent call last):
  File "./beet", line 20, in <module>
     import beets.ui
   File "/home/callum/code/git-repos/beets/beets/beets/ui/__init__.py", line 42, in <module>
     from beets.autotag import mb
   File "/home/callum/code/git-repos/beets/beets/beets/autotag/__init__.py", line 25, in <module>
     from .hooks import (  # noqa
   File "/home/callum/code/git-repos/beets/beets/beets/autotag/hooks.py", line 28, in <module>
     from jellyfish import levenshtein_distance
ModuleNotFoundError: No module named 'jellyfish'

Then after installing jellyfish it works.

If it is just a case of listing these modules in the wiki then I'd be happy to do that. Also, thanks for beets: it's a really cool and useful tool.

sampsyo commented 4 years ago

Yep, very good point. Maybe the better thing to do than jus adding these packages to the wiki would be to just link to the place in setup.py where they're listed so that we can't possibly become out of date. On the other hand, that list—because of the inline versioning logic—is pretty hard to read, so maybe that's not the friendliest way to do it.

Maybe a good compromise would be to add these three new packages, and then just link to the source file and say "this might be out of date, but the actual list is always up to date here"?

govynnus commented 4 years ago

Ah, I didn't know about setup.py. That makes sense, I'll get on to it soon.

govynnus commented 4 years ago

Added that to the Hacking page.

sampsyo commented 4 years ago

Awesome; thank you!!