Advertisement
EsaDev

Restriction violated / Forbidden for URL

Jul 13th, 2020
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. Read from NFC tag: spotify:album:6XhjNHCyCDyyGJRM5mg40G
  2. 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
  3. Traceback (most recent call last):
  4. File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 175, in _internal_call
  5. response.raise_for_status()
  6. File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 941, in raise_for_status
  7. raise HTTPError(http_error_msg, response=self)
  8. requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.spotify.com/v1/me/player/play?device_id=my_device_id_was_here
  9.  
  10. During handling of the above exception, another exception occurred:
  11.  
  12. Traceback (most recent call last):
  13. File "nfc_casting.py", line 231, in <module>
  14. reader.connect(rdwr={'on-connect': get_record, 'beep-on-connect': constants.BEEP})
  15. File "/usr/local/lib/python3.5/dist-packages/nfc/clf/__init__.py", line 581, in connect
  16. result = self._rdwr_connect(rdwr_options, terminate)
  17. File "/usr/local/lib/python3.5/dist-packages/nfc/clf/__init__.py", line 612, in _rdwr_connect
  18. if options['on-connect'](tag):
  19. File "nfc_casting.py", line 194, in get_record
  20. client.start_playback(device_id=spotify_device_id, context_uri=tag_uri)
  21. File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 1331, in start_playback
  22. self._append_device_id("me/player/play", device_id), payload=data
  23. File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 225, in _put
  24. return self._internal_call("PUT", url, payload, kwargs)
  25. File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 190, in _internal_call
  26. headers=response.headers,
  27. spotipy.exceptions.SpotifyException: http status: 403, code:-1 - https://api.spotify.com/v1/me/player/play?device_id=my_device_id_was_here:
  28. Player command failed: Restriction violated
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement