question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spotcast can't start after update

See original GitHub issue

Describe the bug A clear and concise description of what the bug is.

  • Using latest version of spotcast
  • I have setup the Spotify integration in Home Assistant
  • I am using multiple accounts
  • Using latest stable version of Home Assistant
  • I have Spotify Premium
  • I’m attaching relevant logs with level debug for component spotcast (see README)
  • I’m using entity_id in the service call and have tried device_name but the issue remains

Describe the bug

HA unable to start spotcast after a spotcast update.

2021-06-13 17:09:13 ERROR (MainThread) [homeassistant.setup] Error during setup of component spotcast
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 248, in _async_setup_component
    result = await task
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/spotcast/__init__.py", line 51, in setup
    spotcast_controller = SpotcastController(hass, sp_dc, sp_key, accounts)
  File "/config/custom_components/spotcast/spotcast_controller.py", line 158, in __init__
    accounts["default"] = OrderedDict([("sp_dc", sp_dc), ("sp_key", sp_key)])
TypeError: 'NoneType' object does not support item assignment

Environment :

  • HA version: 2021.6.4
  • spotcast version: 3.6.10

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
wannesmarynencommented, Jun 13, 2021

if you are willing to fix it yourself you could go to the filespotcast controller and replace the function init with this:

def __init__(self, hass, sp_dc, sp_key, accounts): 
    if accounts:
        self.accounts = accounts
    self.accounts["default"] = OrderedDict([("sp_dc", sp_dc), ("sp_key", sp_key)])
    self.hass = hass

that fixed it for me

1reaction
chodong-devcommented, Jun 13, 2021

@wannesmarynen, I will try it. Thanks for your comment.

It works well. Thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cant start spotcast on chromecast device. · Issue #182 · fondberg ...
Version Homeassistant: 2021.4.3 Spotcast: v.3.5.2 Stopped working on latest update: Trying to run script to start playback on Google Mini ...
Read more >
custom component to start playback on an idle chromecast ...
If you can't find it spotcast is not installed. This is normally due to HA needing a restart after installing custom components.
Read more >
spotcast - Bountysource
Calling service spotcast.start on an echo device after being idle for a few hours will drop an error. Immediately after a few seconds...
Read more >
HACS - Spotcast configuration: how to? : r/homeassistant
Error executing service: <ServiceCall spotcast.start ... New comments cannot be posted and votes cannot be cast.
Read more >
New Video Sticker Platform to Improve Workplace Safety ...
Training managers can't be right next to someone all the time, to show employees ... SpotCast can be updated with new videos at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found