Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error on a python 2 only machine #3154

Closed
thomas-mc-work opened this issue Feb 19, 2019 · 1 comment
Closed

Syntax error on a python 2 only machine #3154

thomas-mc-work opened this issue Feb 19, 2019 · 1 comment

Comments

@thomas-mc-work
Copy link
Contributor

Problem

I've installed beets in a Docker image that's based on debian:buster with only python 2 installed. Running beets yields this error message:

$ beet 

Led to this problem:

Traceback (most recent call last):
  File "/usr/local/bin/beet", line 6, in <module>
    from beets.ui import main
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 42, in <module>
    from beets.autotag import mb
  File "/usr/local/lib/python2.7/dist-packages/beets/autotag/__init__.py", line 26, in <module>
    from .match import tag_item, tag_album, Proposal  # noqa
  File "/usr/local/lib/python2.7/dist-packages/beets/autotag/match.py", line 24, in <module>
    from munkres import Munkres
  File "/usr/local/lib/python2.7/dist-packages/munkres.py", line 79
    def pad_matrix(self, matrix: Matrix, pad_value: int=0) -> Matrix:
                               ^
SyntaxError: invalid syntax

Setup

  • OS: debian buster
  • Python version: 2.x
  • beets version: latest
  • Turning off plugins made problem go away (yes/no): no

Solution

The problem comes from the dependency munkres which dropped python 2 compatibility starting from version 1.1. So beets should limit the maximum version to<1.1 (1.0.12) in setup.py.

@sampsyo
Copy link
Member

sampsyo commented Feb 19, 2019

Please see #3146 and related issues linked therein.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants