Any invocation of beet immediately fails. This was working as recently as three weeks ago.
Running this command in verbose (-vv) mode:
$ beet -vv import Amaranthe
Traceback (most recent call last):
File "/usr/local/bin/beet", line 7, in <module>
from beets.ui import main
File "/usr/local/lib/python3.5/dist-packages/beets/ui/__init__.py", line 42, in <module>
from beets.autotag import mb
File "/usr/local/lib/python3.5/dist-packages/beets/autotag/__init__.py", line 26, in <module>
from .match import tag_item, tag_album, Proposal # noqa
File "/usr/local/lib/python3.5/dist-packages/beets/autotag/match.py", line 24, in <module>
from munkres import Munkres
File "/usr/local/lib/python3.5/dist-packages/munkres.py", line 20, in <module>
from typing import Union, NewType, Sequence, Tuple, NoReturn, Optional, Callable
ImportError: cannot import name 'NoReturn'
My configuration (output of beet config) is:
directory: /home/media/music
library: /var/lib/beets/data/musiclibrary.db
plugins: fetchart lyrics lastgenre multidisc missing scrub
import:
move: yes
language: en
paths:
default: $albumartist_sort - $album ($year)/%if{$multidisc,Disc $disc%if{$disctitle, - $disctitle}/}/$track - $title
asciify_paths: yes
missing:
format: $albumartist_sort - $album ($year)/%if{$multidisc,Disc $disc%if{$disctitle, - $disctitle}/}/$track - $title
count: no
total: no
Seconding this bug report.
Traceback (most recent call last):
File "/home/erj/.local/bin/beet", line 7, in <module>
from beets.ui import main
File "/home/erj/.local/lib/python3.5/site-packages/beets/ui/__init__.py", line 42, in <module>
from beets.autotag import mb
File "/home/erj/.local/lib/python3.5/site-packages/beets/autotag/__init__.py", line 26, in <module>
from .match import tag_item, tag_album, Proposal # noqa
File "/home/erj/.local/lib/python3.5/site-packages/beets/autotag/match.py", line 24, in <module>
from munkres import Munkres
File "/home/erj/.local/lib/python3.5/site-packages/munkres.py", line 20, in <module>
from typing import Union, NewType, Sequence, Tuple, NoReturn, Optional, Callable
ImportError: cannot import name 'NoReturn'
pip3directory: ~/Muisc
library: ~/.config/beets/musiclibrary.db
plugins: fetchart lyrics badfiles scrub zero duplicates missing
zero:
fields: comments images acoustid_fingerprint
update_database: true
However, my other machine does not have this error:
pip3My guess is a recent library update broke Python 3.5.x support.
It seems that munkres has changed it's minimum Python version - their changelog says that it still supports 3.5, however the typings they've added require 3.6.5 (typing.NoReturn was only introduced in Python 3.6.5).
@sampsyo any suggestions? We could lock down the version of this to pre-1.1.0, but it might be better if we open up an issue or PR on munkres to fix this in the long term.
Yep! That sounds like exactly what's going on, @jackwilsdon. Thanks for looking into it.
I recommend we do both: pin the version for now, and also file an issue to tell the Munkres developers that their requirements don't align with the code.
After doing a little bit more digging, it seems it was actually added in Python 3.5.4 and the Python docs are wrong! This is still less than ideal, so I'm opening a PR on munkres to remove uses of typing.NoReturn until they drop support for <3.5.4.
Fantastic! Thank you for digging into the issue. :sparkles:
munkres 1.1.2 has been released with a fix for <3.5.4.
@DarkVirtue @ethanrjones97 could you try pip install -U beets? It should update the version of munkres installed.
If that doesn't work try pip install munkres==1.1.2, but you shouldn't need to do that as updating beets should sort it out for you.
Pip grabbed the new version of munkres and beets is working fine for me now.
Thanks a ton!
Wow; that was quick!! Thanks for the fast work, @jackwilsdon!
Most helpful comment
Pip grabbed the new version of munkres and beets is working fine for me now.
Thanks a ton!