christopher-dG / gpymusic

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

Crashes on search #12

Closed dreh23 closed 7 years ago

dreh23 commented 7 years ago

What I did:

s tribe

reproducable: yes

Searching for 'tribe'...Traceback (most recent call last):
Now playing: None
File "/home/CELLULOIDVFX.INC/johannesa/.local/lib/python3.5/site-packages/gmusicapi/protocol/shared.py", line 218, in perform
response.raise_for_status()
File "/home/CELLULOIDVFX.INC/johannesa/.local/lib/python3.5/site-packages/requests/models.py", line 909, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://mclients.googleapis.com/sj/v2.5/query?max-results=12&hl=en_US&ct=1%2C2%2C3%2C4%2C6%2C7%2C8%2C9&tier=fr&q=tribe&dv=0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pmcli", line 1253, in <module>
transition(out.get_input())
File "/usr/local/bin/pmcli", line 717, in transition
commands[command](arg)
File "/usr/local/bin/pmcli", line 967, in search
result = api.search(query, max_results=limit)
File "/home/CELLULOIDVFX.INC/johannesa/.local/lib/python3.5/site-packages/gmusicapi/clients/mobileclient.py", line 1820, in search
res = self._make_call(mobileclient.Search, query, max_results)
File "/home/CELLULOIDVFX.INC/johannesa/.local/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/CELLULOIDVFX.INC/johannesa/.local/lib/python3.5/site-packages/gmusicapi/protocol/shared.py", line 226, in perform
raise CallFailure(err_msg, call_name)
gmusicapi.exceptions.CallFailure: Search: 403 Client Error: Forbidden for url: https://mclients.googleapis.com/sj/v2.5/query?max-results=12&hl=en_US&ct=1%2C2%2C3%2C4%2C6%2C7%2C8%2C9&tier=fr&q=tribe&dv=0
(requests kwargs: {'url': 'https://mclients.googleapis.com/sj/v2.5/query', 'method': 'GET', 'headers': {'Authorization': '<omitted>'}, 'params': {'max-results': 12, 'hl': 'en_US', 'ct': '1,2,3,4,6,7,8,9', 'tier': 'fr', 'q': 'tribe', 'dv': 0}})
(response was: '{"error":{"errors":[{"domain":"global","reason":"forbidden","message":"Forbidden"}],"code":403,"message":"Forbidden"}}')

git commit 01ddf08b6314aec52aca7ff1ad34ae1ceb3e9d32

terminator 0.98

Python 3.5.2

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:    16.04
Codename:   xenial
[cplayer] mpv 0.22.0 (C) 2000-2016 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Mon Nov 21 14:57:51 UTC 2016
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       55.34.100
[cplayer]    libavcodec      57.64.100
[cplayer]    libavformat     57.56.100
[cplayer]    libswscale      4.2.100
[cplayer]    libavfilter     6.65.100
[cplayer]    libswresample   2.3.100
[cplayer] ffmpeg version: 3.2
dreh23 commented 7 years ago

Probably this one: #5

christopher-dG commented 7 years ago

Yeah that's been happening for a few people with free accounts (but curiously, not me). I'm working on an alternative for free users that won't have this problem.