wernight / docker-mopidy

Containerized Mopidy MPD (Music Player Daemon) along with Spotify, Google Music... plugins.
https://hub.docker.com/r/wernight/mopidy/
MIT License
160 stars 86 forks source link

Gmusic extension fails - dependency gpsoauth not installed #50

Closed DeadEnded closed 2 years ago

DeadEnded commented 2 years ago

.... TL:DR I think I found the problem. pipfile.lock has pinned version 1.0.0 which requires python 3.8 gpsoauth on April 2nd changed the minimum python version to 3.8. docker-mopidy is currently running python 3.7.

Either the pinned version in the pipfile.lock needs changed to 0.4.3, or python version needs to be updated to minimum of 3.8.

Details below of my digging! Thanks! DeadEnd


Trying out Mopidy for the first time. Fighting through config etc. and I have this error on container start:

ERROR    2021-12-13 13:55:16,203 [7:MainThread] mopidy.ext
  Setup of extension from entry point gmusic failed, ignoring extension.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mopidy/ext.py", line 234, in load_extensions
    command = extension.get_command()
  File "/usr/local/lib/python3.7/dist-packages/mopidy_gmusic/__init__.py", line 55, in get_command
    from .commands import GMusicCommand
  File "/usr/local/lib/python3.7/dist-packages/mopidy_gmusic/commands.py", line 1, in <module>
    import gmusicapi
  File "/usr/local/lib/python3.7/dist-packages/gmusicapi/__init__.py", line 2, in <module>
    from gmusicapi.clients import Webclient, Musicmanager, Mobileclient
  File "/usr/local/lib/python3.7/dist-packages/gmusicapi/clients/__init__.py", line 1, in <module>
    from gmusicapi.clients.webclient import Webclient
  File "/usr/local/lib/python3.7/dist-packages/gmusicapi/clients/webclient.py", line 9, in <module>
    import gmusicapi.session
  File "/usr/local/lib/python3.7/dist-packages/gmusicapi/session.py", line 9, in <module>
    import gpsoauth
ModuleNotFoundError: No module named 'gpsoauth'

Attaching to the container and pip install gpsoauth fixes this error. I know gmusic is in the pipfile:

[packages]
youtube-dl = "*"
mopidy-iris = "*"
mopidy-moped = "*"
mopidy-gmusic = "*"
mopidy-pandora = "*"
mopidy-youtube = "*"
mopidy-local = "*"
mopidy-mpd = "*"
pyopenssl = "*"

Then checking the pipfile.lock file I see a pinned version:

        "gpsoauth": {
            "hashes": [
                "sha256:149c374863eec17cdac5279d57e4905592a9cd74cc34b7e58671cb19f9238f39",
                "sha256:1c4d6a980625b8ab6f6f1cf3e30d9b10a6c61ababb2b60bfe4870649e9c82be0"
            ],
            "markers": "python_version >= '3.8' and python_version < '4.0'",
            "version": "==1.0.0"
        },

But when I manually install gpsoauth it wants to use version 0.4.3... If I force 1.0.0 it fails:

$ pip install gpsoauth==1.0.0
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement gpsoauth==1.0.0 (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3)
ERROR: No matching distribution found for gpsoauth==1.0.0

Version 1.0.0 exists and was released in April of this year. Looking at the gpsoauth repo - it looks like right around the 1.0.0 release they changed the minimum python version to 3.8: https://github.com/simon-weber/gpsoauth/commit/6cffedccb3b28a4acf283a4c5794262cd3392be0

I checked in the container and it is running python 3.7. So - apologies for the long post... I'll do a TL:DR - but gpsoauth appears to fail to install due to minimum python version and the pinned version in the pipfile.lock.

Cheers! Thanks! DeadEnd

DeadEnded commented 2 years ago

Fixed with #53 - Closing issue.