anlutro / botologist

Plugin-driven Python3 IRC
MIT License
5 stars 5 forks source link

Spotify 401 when looking up things #83

Closed anlutro closed 7 years ago

anlutro commented 7 years ago
2017-06-12 20:57:32,959 [ WARNING] [plugins.spotify] spotipy threw an exception while looking up spotify:track:6YqEF5BsAUd99WOx6ycSB1
Traceback (most recent call last):
  File "/home/andreas/scripts/ircbot/.virtualenv/lib/python3.4/site-packages/spotipy/client.py", line 119, in _internal_call
    r.raise_for_status()
  File "/home/andreas/scripts/ircbot/.virtualenv/lib/python3.4/site-packages/requests/models.py", line 837, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.spotify.com/v1/tracks/6YqEF5BsAUd99WOx6ycSB1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/andreas/scripts/ircbot/plugins/spotify.py", line 40, in get_info_str
    return '%s - %s - %s' % self.get_track(item_id)
  File "/home/andreas/scripts/ircbot/plugins/spotify.py", line 29, in get_track
    data = self.spotipy.track(track_id)
  File "/home/andreas/scripts/ircbot/.virtualenv/lib/python3.4/site-packages/spotipy/client.py", line 223, in track
    return self._get('tracks/' + trid)
  File "/home/andreas/scripts/ircbot/.virtualenv/lib/python3.4/site-packages/spotipy/client.py", line 146, in _get
    return self._internal_call('GET', url, payload, kwargs)
  File "/home/andreas/scripts/ircbot/.virtualenv/lib/python3.4/site-packages/spotipy/client.py", line 124, in _internal_call
    headers=r.headers)
spotipy.client.SpotifyException: http status: 401, code:-1 - https://api.spotify.com/v1/tracks/6YqEF5BsAUd99WOx6ycSB1:
 No token provided