spotcast: error with 0.117.0 release of home assistant

my repo is validated by travis-ci. building against home Assistant 0.117.0 gives the following error:

 homeassistant.packages.spotcast.spotcast: 
    - Package spotcast setup failed. Component spotcast No module named 'plexapi'

removal of spotcast allows the build to pass and no errors are raised.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

Further information and steps to reproduce: run the official addon: “Check Home Assistant Configuration” check the logs: first run (failed due to lack of spotipy):

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] udev.sh: executing... 
starting version 3.2.9
[16:52:21] INFO: Update udev information
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[16:52:21] INFO: Setup udev devices
[16:52:24] INFO: Don't worry, this temporary installation is not overwriting your current one.
[16:52:24] INFO: Installing Home Assistant: latest...
[16:52:24] INFO: Please be patient, this might take a few minutes...
[16:53:17] INFO: Installed Home Assistant 0.117.1
[16:53:17] INFO: Making a copy of your configuration for checking...
[16:54:19] INFO: Checking your configuration against this version...
[16:57:19] ERROR: The configuration check did not pass!
[16:57:19] ERROR: See the output below for more details.
Testing configuration at /tmp/config
Failed config
  homeassistant.packages.spotcast.spotcast: 
    - Package spotcast setup failed. Component spotcast No module named 'spotipy'
    - sensor: [source /tmp/config/packages/media_players/spotcast.yaml:9]
        - platform: spotcast
      spotcast: [source /tmp/config/packages/media_players/spotcast.yaml:1]
        accounts: [source /tmp/config/packages/media_players/spotcast.yaml:4]
          emma: [source /tmp/config/packages/media_players/spotcast.yaml:5]
            sp_dc: REDACTED
            sp_key: REDACTED
        sp_dc: REDACTED
        sp_key: REDACTED

Successful config (partial)
[16:57:19] INFO: The full output has been written to /share/check_config.txt
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Add spotipy to resources. 2nd run log (failed due to lack of pychromecast):

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] udev.sh: executing... 
starting version 3.2.9
[17:06:47] INFO: Update udev information
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[17:06:48] INFO: Setup udev devices
[17:06:51] INFO: Don't worry, this temporary installation is not overwriting your current one.
[17:06:51] INFO: Installing Home Assistant: latest...
[17:06:51] INFO: Please be patient, this might take a few minutes...
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
aiohttp 3.6.2 requires multidict<5.0,>=4.5, but you'll have multidict 5.0.0 which is incompatible.
[17:07:33] INFO: Installed Home Assistant 0.117.1
[17:07:33] INFO: Making a copy of your configuration for checking...
[17:07:49] INFO: Checking your configuration against this version...
[17:11:02] ERROR: The configuration check did not pass!
[17:11:02] ERROR: See the output below for more details.
Testing configuration at /tmp/config
Failed config
  homeassistant.packages.spotcast.spotcast: 
    - Package spotcast setup failed. Component spotcast No module named 'pychromecast'
    - sensor: [source /tmp/config/packages/media_players/spotcast.yaml:9]
        - platform: spotcast
      spotcast: [source /tmp/config/packages/media_players/spotcast.yaml:1]
        accounts: [source /tmp/config/packages/media_players/spotcast.yaml:4]
          emma: [source /tmp/config/packages/media_players/spotcast.yaml:5]
            sp_dc: REDACTED
            sp_key: REDACTED
        sp_dc: REDACTED
        sp_key: REDACTED

  General Errors: 
[17:11:02] INFO: The full output has been written to /share/check_config.txt
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

add pychromecast to resources 3rd run log(failed due to lack of plexapi):

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] udev.sh: executing... 
starting version 3.2.9
[17:14:19] INFO: Update udev information
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[17:14:19] INFO: Setup udev devices
[17:14:22] INFO: Don't worry, this temporary installation is not overwriting your current one.
[17:14:22] INFO: Installing Home Assistant: latest...
[17:14:22] INFO: Please be patient, this might take a few minutes...
[17:15:11] INFO: Installed Home Assistant 0.117.1
[17:15:11] INFO: Making a copy of your configuration for checking...
[17:16:06] INFO: Checking your configuration against this version...
[17:18:53] ERROR: The configuration check did not pass!
[17:18:53] ERROR: See the output below for more details.
Testing configuration at /tmp/config
Failed config
  homeassistant.packages.spotcast.spotcast: 
    - Package spotcast setup failed. Component spotcast No module named 'plexapi'
    - sensor: [source /tmp/config/packages/media_players/spotcast.yaml:9]
        - platform: spotcast
      spotcast: [source /tmp/config/packages/media_players/spotcast.yaml:1]
        accounts: [source /tmp/config/packages/media_players/spotcast.yaml:4]
          emma: [source /tmp/config/packages/media_players/spotcast.yaml:5]
            sp_dc: REDACTED
            sp_key: REDACTED
        sp_dc: REDACTED
        sp_key: REDACTED

  General Errors: 
grep: write error: Broken pipe
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Add plexapi to resources. 4th run log (failed due to lack of plexwebsocket):

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] udev.sh: executing... 
starting version 3.2.9
[17:51:47] INFO: Update udev information
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[17:51:48] INFO: Setup udev devices
[17:51:50] INFO: Don't worry, this temporary installation is not overwriting your current one.
[17:51:50] INFO: Installing Home Assistant: latest...
[17:51:50] INFO: Please be patient, this might take a few minutes...
[17:52:39] INFO: Installed Home Assistant 0.117.1
[17:52:39] INFO: Making a copy of your configuration for checking...
[17:53:18] INFO: Checking your configuration against this version...
[17:56:15] ERROR: The configuration check did not pass!
[17:56:15] ERROR: See the output below for more details.
Testing configuration at /tmp/config
Failed config
  homeassistant.packages.spotcast.spotcast: 
    - Package spotcast setup failed. Component spotcast No module named 'plexwebsocket'
    - sensor: [source /tmp/config/packages/media_players/spotcast.yaml:9]
        - platform: spotcast
      spotcast: [source /tmp/config/packages/media_players/spotcast.yaml:1]
        accounts: [source /tmp/config/packages/media_players/spotcast.yaml:4]
          emma: [source /tmp/config/packages/media_players/spotcast.yaml:5]
            sp_dc: REDACTED
            sp_key: REDACTED
        sp_dc: REDACTED
        sp_key: REDACTED

  General Errors: 
grep: write error: Broken pipe
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Add plexwebsocket. 5th run - success!

I can only assume that plex being required is related to the newly added ability to stream plex to cast devices in HA.

It may be that the config may work for some people if other components which use these resources are loaded first, but this cannot be guaranteed.

also, please note that my PR added resources, not dependencies. I remember needing to remove resources which are loaded automatically by a base home assistant install, but it appears that these are no longer loaded by default

@pinkywafer thanks for that … it’s always such a risk upgrading … now I just need to fix my tradfri implementation.

@elyobelyob I have edited my custom_components/spotcast/manifest.json file and all now works again. You can do the same by copying mine from https://github.com/fondberg/spotcast/pull/137/commits/0671ae30704a8eb60436ae48177325cc2ca0ae47