christopher-dG / gpymusic

Google Py Music: A simple TUI client for Google Play Music
MIT License
200 stars 13 forks source link

pmcli will not launch, is_subscribed error #17

Closed Vison5 closed 7 years ago

Vison5 commented 7 years ago

After setting up the config file with my login credentials and device ID, I've gotten this error.

`Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/gmusicapi/utils/utils.py", line 655, in get value, last_update = inst._cache[self.name] KeyError: 'is_subscribed'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/pmcli", line 24, in <module>
    common.mc.is_subscribed
  File "/usr/lib/python3.6/site-packages/gmusicapi/utils/utils.py", line 660, in __get__
    value = self.fget(inst)
  File "/usr/lib/python3.6/site-packages/gmusicapi/clients/mobileclient.py", line 75, in is_subscribed
    res = self._make_call(mobileclient.Config)
  File "/usr/lib/python3.6/site-packages/gmusicapi/clients/shared.py", line 84, in _make_call
    return protocol.perform(self.session, self.validate, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/gmusicapi/protocol/shared.py", line 209, in perform
    response = session.send(req_kwargs, cls.required_auth)
  File "/usr/lib/python3.6/site-packages/gmusicapi/session.py", line 84, in send
    raise NotLoggedIn
gmusicapi.exceptions.NotLoggedIn

All dependencies should be installed through pip or pacman on Arch. I see the error is calling from the python gmusicapi package, so if this isn't the right place to be posting this, please let me know!

christopher-dG commented 7 years ago

Is your account free or paid? If you have a free account, have you run script/oauth_login.py?

Also, does this happen every time?

Vison5 commented 7 years ago

I am a subscribed user to google play music. I have the family plan if that makes a difference? To clarify: Yes, it does happen everytime.

I was able to launch it prior to using the develop branch; however as recommended I had switched over after encountering a problem with get_dev_id.py

On Sun, Mar 5, 2017, 9:26 PM Chris de Graaf notifications@github.com wrote:

Is your account free or paid? If you have a free account, have you run script/oauth_login.py?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/christopher-dG/pmcli/issues/17#issuecomment-284287666, or mute the thread https://github.com/notifications/unsubscribe-auth/AUXU9hMRCk-hIABxBagFUl_-REhDloxqks5ri27ggaJpZM4MTqGZ .

christopher-dG commented 7 years ago

Can you open a Python interpreter and enter the following:

import json
from os.path import join, expanduser
from gmusicapi import Mobileclient
mc = Mobileclient()
with open(join(expanduser('~'), '.config', 'pmcli', 'config.json')) as f:
    u = json.loads(f.read())['user']
print(mc.login(u['email'], u['password'], u['deviceid'])
print(mc.is_subscribed)

Do you get any errors, and if not, what is the output?

christopher-dG commented 7 years ago

I think I just found the bug. Am I right in assuming that you didn't have colour enabled? If you get the latest src/main.py from develop, it should work.

e: it's in master now