christopher-dG / gpymusic

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

Crashing on start #28

Closed dis-aster closed 7 years ago

dis-aster commented 7 years ago

Logging in... Logged in as m.........7k@gmail.com (Free). Enter 'h' or 'help' if you need help.Traceback (most recent call last): File "/home/maxim/bin/gpymusic", line 26, in ) else common.client.FreeClient() AttributeError: 'NoneType' object has no attribute 'FreeClient'

christopher-dG commented 7 years ago

I can't reproduce this so I'm going to need more information. OS, Python version and gmusicapi version at least. It looks like you've installed in a somewhat non-standard way, so can you detail the steps you took to install the program?

matteing commented 7 years ago

I fixed this in my pip commit. You can probs cherry pick it.

Get Outlook for Androidhttps://aka.ms/ghei36


From: Chris de Graaf notifications@github.com Sent: Wednesday, May 17, 2017 4:50:47 PM To: christopher-dG/gpymusic Cc: Subscribed Subject: Re: [christopher-dG/gpymusic] Crashing on start (#28)

I can't reproduce this so I'm going to need more information. OS, Python version and gmusicapi version at least. It looks like you've installed in a somewhat non-standard way, so can you detail the steps you took to install the program?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/christopher-dG/gpymusic/issues/28#issuecomment-302227722, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHlzZScTziBAnGxZEEZbac3hUluEsksMks5r612ngaJpZM4NeFwx.

matteing commented 7 years ago

Found it: https://github.com/ftxrc/gpymusic/commit/720e7fa460d30aef68957312a3564f778a2fb7ab It's a typo with the Free tier client.


From: Chris de Graaf notifications@github.com Sent: Wednesday, May 17, 2017 4:50:47 PM To: christopher-dG/gpymusic Cc: Subscribed Subject: Re: [christopher-dG/gpymusic] Crashing on start (#28)

I can't reproduce this so I'm going to need more information. OS, Python version and gmusicapi version at least. It looks like you've installed in a somewhat non-standard way, so can you detail the steps you took to install the program?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/christopher-dG/gpymusic/issues/28#issuecomment-302227722, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHlzZScTziBAnGxZEEZbac3hUluEsksMks5r612ngaJpZM4NeFwx.

dis-aster commented 7 years ago

gpymusic installed as symlink: ~/bin/gpymusic -> /home/maxim/.local/share/gpymusic/src/main.py

OS: Ubuntu 16.04 uname -a Linux ENVY 4.10.2-041002-generic #201703120131 SMP Sun Mar 12 06:33:34 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Python: 3.5.2 virtualenv through pyenv

pip3 list: Package Version


appdirs 1.4.3
beautifulsoup4 4.6.0
decorator 4.0.11 future 0.16.0 gmusicapi 10.1.2 gpsoauth 0.4.1
httplib2 0.10.3 MechanicalSoup 0.7.0
mock 2.0.0
mutagen 1.37
oauth2client 4.1.0
pbr 3.0.0
pip 9.0.1
proboscis 1.2.6.0 protobuf 3.3.0
pyasn1 0.2.3
pyasn1-modules 0.0.8
pycryptodomex 3.4.5
python-dateutil 2.6.0
requests 2.14.2 rsa 3.4.2
setuptools 20.10.1 six 1.10.0 validictory 1.1.1

gpmusic$ git pull Already up-to-date.

christopher-dG commented 7 years ago

@ftxrc thanks! I wasn't able to "properly" cherry pick since there were some other changes in bin/gpymusic but either way it's fixed.

dis-aster commented 7 years ago

unfortunately with fix ftxrc@720e7fa i get this exception:

Logging in... Logged in as m********7k@gmail.com (Free).
Enter 'h' or 'help' if you need help./home/maxim/.pyenv/versions/gpmusic/lib/python3.5/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access /home/maxim/.local/share/gmusicapi/oauth.cred: No such file or directory
warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
2017-05-18 00:20:17,768 - gmusicapi.Musicmanager2 (musicmanager:186) [WARNING]: could not retriGenerating your library...Traceback (most recent call last):
Could not find library file.                                  File "/home/maxim/bin/gpymusic", line 27, in <module>
) else client.FreeClient()
File "/home/maxim/.local/share/gpymusic/src/client.py", line 311, in __init__
self.gen_library()
File "/home/maxim/.local/share/gpymusic/src/client.py", line 347, in gen_library
for song in self.mm.get_uploaded_songs():
File "/home/maxim/.pyenv/versions/gpmusic/lib/python3.5/site-packages/gmusicapi/clients/musicmanager.py", line 287, in get_uploaded_songs
to_return = [song for chunk in to_return for song in chunk]
File "/home/maxim/.pyenv/versions/gpmusic/lib/python3.5/site-packages/gmusicapi/clients/musicmanager.py", line 287, in <listcomp>
to_return = [song for chunk in to_return for song in chunk]
File "/home/maxim/.pyenv/versions/gpmusic/lib/python3.5/site-packages/gmusicapi/clients/musicmanager.py", line 337, in _get_all_songs
export_type)
File "/home/maxim/.pyenv/versions/gpmusic/lib/python3.5/site-packages/gmusicapi/clients/shared.py", line 84, in _make_call
return protocol.perform(self.session, self.validate, *args, **kwargs)
File "/home/maxim/.pyenv/versions/gpmusic/lib/python3.5/site-packages/gmusicapi/protocol/shared.py", line 207, in perform
req_kwargs = cls.build_request(*args, **kwargs)
File "/home/maxim/.pyenv/versions/gpmusic/lib/python3.5/site-packages/gmusicapi/protocol/shared.py", line 89, in build_request
val = val(*args, **kwargs)
File "<decorator-gen-68>", line 2, in dynamic_data
File "/home/maxim/.pyenv/versions/gpmusic/lib/python3.5/site-packages/gmusicapi/protocol/musicmanager.py", line 69, in pb
msg = f(*args, **kwargs)
File "/home/maxim/.pyenv/versions/gpmusic/lib/python3.5/site-packages/gmusicapi/protocol/musicmanager.py", line 652, in dynamic_data
msg.client_id = client_id
TypeError: None has type NoneType, but expected one of: bytes, unicode
dis-aster commented 7 years ago

sorry. my mistake. Missed the launch of the script oauth_login.py now all fine!

christopher-dG commented 7 years ago

Yeah, that's still a problem though -- even if you haven't run the scripts it should let you know and exit gracefully. Thanks for bringing this up!