stevenewbs / gmpydl

Google Music Python Downloader
MIT License
22 stars 8 forks source link

Issue after inputting auth token #9

Closed parkerlreed closed 7 years ago

parkerlreed commented 7 years ago
Traceback (most recent call last):
  File "./gmpydl.py", line 313, in <module>
    main()
  File "./gmpydl.py", line 215, in main
    fill_all_store(api)
  File "./gmpydl.py", line 152, in fill_all_store
    for chunk in api.get_uploaded_songs(incremental=True):
  File "/usr/lib/python2.7/site-packages/gmusicapi/clients/musicmanager.py", line 337, in _get_all_songs
    export_type)
  File "/usr/lib/python2.7/site-packages/gmusicapi/clients/shared.py", line 84, in _make_call
    return protocol.perform(self.session, self.validate, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/gmusicapi/protocol/shared.py", line 261, in perform
    raise_from(CallFailure(err_msg, e.callname), e)
  File "/usr/lib/python2.7/site-packages/six.py", line 718, in raise_from
    raise value
gmusicapi.exceptions.CallFailure: ListTracks: ListTracks: Track export (list) error code 5: UNABLE_TO_REGISTER_CLIENT.
(requests kwargs: {u'url': u'https://music.google.com/music/exportids', u'headers': {u'X-Device-ID': u'20:1A:06:D8:D0:88', u'Authorization': u'<omitted>', u'User-agent': u'Music Manager (1, 0, 55, 7425 HTTPS - Windows)'}, u'data': '\x12\x1120:1A:06:D8:D0:88 \x01(\x00', u'method': u'POST'})
(response was: u'\x08\x05')

Made sure to run a pip2 install gmsuicapi --upgrade beforehand.

stevenewbs commented 7 years ago

It doesn't seem to be an issue with gmpydl or gmusicapi. The error seems to be in registering the client. I believe for GPM you can only have a certain number of clients or devices connected to the account. Log into GPM in a browser and go to Settings -> Devices and see how many you have there. I think the limit is 10

parkerlreed commented 7 years ago

Odd, it's only showing 3. I have been having issues using Music Manager too which is what led me here again. I tried talking with a Google rep yesterday but they kept trying to have me clear the browser when it was obviously an account/program issue.

stevenewbs commented 7 years ago

If you have a look through the device list, does the gmusicapi entry show or not? I would guess not as the error is regarding registering the client. If it does, maybe try removing it. Either way, sounds more like an issue with GPM than the script.

parkerlreed commented 7 years ago

I don't think I've ever seen gmusicapi in the device list. Every time I have used it I have just created an app password and used my phone's device ID. (for example in mopidy-gmusic). I'll close this out as it is an issue on my end.

silelmot commented 7 years ago

I have the same errors. Google Play Manager is shown after this in my List of Devices. so it should have the allowance to get infos about my mp3s, but i get the error: Traceback (most recent call last):

  File "./gmpydl.py", line 313, in <module>
    main()
  File "./gmpydl.py", line 213, in main
    api = api_init()
  File "./gmpydl.py", line 138, in api_init
    mm.perform_oauth(storage_filepath=creds)
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi/clients/musicmanager.py", line 101, in perform_oauth
    credentials = flow.step2_exchange(code)
  File "/usr/local/lib/python2.7/dist-packages/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/oauth2client/client.py", line 2089, in step2_exchange
    raise FlowExchangeError(error_msg)
oauth2client.client.FlowExchangeError: invalid_requestMissing required parameter: code
stevenewbs commented 7 years ago

Looking at the trace it looks like this is during the oauth handshaking rather than an issue with gmpydl itself.

silelmot commented 7 years ago

yes, it was my fault: i had to run gmpydl.py with sudo