After configuring all without any error from checking the various configurations, i get the following error when i try to send spotify playlist to one of my media players:
Error executing service <ServiceCall media_player.volume_set: volume_level=0.4, entity_id=[‘media_player.spotify’]>
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/spotipy/client.py”, line 121, in _internal_call
r.raise_for_status()
File “/srv/homeassistant/lib/python3.5/site-packages/requests/models.py”, line 935, 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/volume?volume_percent=40
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1002, in _event_to_service_call
await service_handler.func(service_call)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/init.py”, line 403, in async_service_handler
yield from getattr(player, method[‘method’])(**params)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/spotify.py”, line 216, in set_volume_level
self._player.volume(int(volume * 100))
File “/srv/homeassistant/lib/python3.5/site-packages/spotipy/client.py”, line 976, in volume
self._put(self._append_device_id(“me/player/volume?volume_percent=%s” % volume_percent, device_id))
File “/srv/homeassistant/lib/python3.5/site-packages/spotipy/client.py”, line 190, in _put
return self._internal_call(‘PUT’, url, payload, kwargs)
File “/srv/homeassistant/lib/python3.5/site-packages/spotipy/client.py”, line 126, in _internal_call
headers=r.headers)
spotipy.client.SpotifyException: http status: 403, code:-1 - https://api.spotify.com/v1/me/player/volume?volume_percent=40:
Not available for the current user
Can you help me in tracking and solving this?