simon-weber / gmusicapi

An unofficial client library for Google Music.

Home Page:https://unofficial-google-music-api.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`MusicManager.perform_oauth()` results in `__init__() takes at most 4 positional arguments (5 given)`

mitchmindtree opened this issue · comments

Hi @simon-weber :) Just ran into this when attempting to setup an old project using gmusicapi on a new machine.

This is the same issue as thebigmunch/gmusicapi-scripts#80 and thebigmunch/gmusicapi-wrapper#14, however I believe it belongs here upstream.

I'm following the usage example in the usage docs and am attempting to run this script:

from gmusicapi import Musicmanager

mm = Musicmanager()
mm.perform_oauth()

When running this, I get the following output:

__init__() takes at most 4 positional arguments (5 given)

Visit the following url: <omitted URL>
Follow the prompts, then paste the auth code here and hit enter:

I can follow the given URL, generate a code, paste it in the buffer, hit enter and then the script ends (presumably successfully). However, attempting to Mobileclient.login() after this continues to fail (with no error message or indication of cause). I can't help but wonder if this has something to do with the line printed above about an incorrect number of positional arguments?

Any thoughts or advice appreciated!

Ah, some more info that might be useful:

python version: 3.7.0
gmusicapi version (via pip freeze): 11.0.2
OS: Arch Linux w/ GNOME desktop.

I tried logging into the mobile client again, this time with debug logging enabled:

INFO:gmusicapi.Mobileclient1:!-- begin debug log --!
INFO:gmusicapi.Mobileclient1:version: 11.0.2
INFO:gmusicapi.Mobileclient1:logging to: /home/mindtree/.cache/gmusicapi/log/gmusicapi.log
INFO:gmusicapi.Mobileclient1:initialized
INFO:gmusicapi.Mobileclient1:logged out
INFO:gmusicapi.Mobileclient1:failed to authenticate

This is coming from Google's OAuth library. They're doing some very bizarre signature checking which prints that message as a warning even though the call is correct from python's perspective.

I'll fix it, but I don't think it's the cause of your login failure.

Released in 11.0.3.