Error while setting up platform spotify

Hi all,

Still pretty new to home assistant, but loving it so far. I’m running HA on a CHIP and it’s been working great.
I added the spotify component which worked like a charm. Unfortunately, since this morning the component stopped working. This is the error it gives:

ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform spotify
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 155, in _async_setup_platform
entity_platform.schedule_add_entities, discovery_info
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/spotify.py”, line 81, in setup_platform
token_info = oauth.get_cached_token()
File “/home/homeassistant/.homeassistant/deps/spotipy/oauth2.py”, line 132, in get_cached_token
token_info = json.loads(token_info_string)
File “/usr/lib/python3.4/json/init.py”, line 318, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.4/json/decoder.py”, line 343, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.4/json/decoder.py”, line 361, in raw_decode
raise ValueError(errmsg(“Expecting value”, s, err.value)) from None
ValueError: Expecting value: line 1 column 1 (char 0)

I have spotify setup in the config file as follows:

media_player:
  - platform: spotify
    client_id: !secret_client_id
    client_secret: !secret_client_secret

Anyone knows what this could be and how to solve it?

Thanks in advance,
Glenn

Same issue here.

I receive this now

2018-06-14 12:22:10 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform spotify
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py”, line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 358, in wait_for
return fut.result()
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/media_player/spotify.py”, line 82, in setup_platform
token_info = oauth.get_cached_token()
File “/usr/lib/python3.6/site-packages/spotipy/oauth2.py”, line 132, in get_cached_token
token_info = json.loads(token_info_string)
File “/usr/lib/python3.6/json/init.py”, line 354, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.6/json/decoder.py”, line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.6/json/decoder.py”, line 357, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Hmm, I’m wondering if spotify changed thier responses. @anon35356645 this may be a bug and your config in the other thread is probably correct.