Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Read from NFC tag: spotify:album:6XhjNHCyCDyyGJRM5mg40G
- HTTP Error for PUT to https://api.spotify.com/v1/me/player/play?device_id=my_device_id_was_here returned 403 due to Player command failed: Restriction violated
- Traceback (most recent call last):
- File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 175, in _internal_call
- response.raise_for_status()
- File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 941, in raise_for_status
- raise HTTPError(http_error_msg, response=self)
- requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.spotify.com/v1/me/player/play?device_id=my_device_id_was_here
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "nfc_casting.py", line 231, in <module>
- reader.connect(rdwr={'on-connect': get_record, 'beep-on-connect': constants.BEEP})
- File "/usr/local/lib/python3.5/dist-packages/nfc/clf/__init__.py", line 581, in connect
- result = self._rdwr_connect(rdwr_options, terminate)
- File "/usr/local/lib/python3.5/dist-packages/nfc/clf/__init__.py", line 612, in _rdwr_connect
- if options['on-connect'](tag):
- File "nfc_casting.py", line 194, in get_record
- client.start_playback(device_id=spotify_device_id, context_uri=tag_uri)
- File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 1331, in start_playback
- self._append_device_id("me/player/play", device_id), payload=data
- File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 225, in _put
- return self._internal_call("PUT", url, payload, kwargs)
- File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 190, in _internal_call
- headers=response.headers,
- spotipy.exceptions.SpotifyException: http status: 403, code:-1 - https://api.spotify.com/v1/me/player/play?device_id=my_device_id_was_here:
- Player command failed: Restriction violated
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement