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.

AttributeError: module 'pychromecast' has no attribute 'get_chromecast_from_cast_info'

See original GitHub issue

Hello,

After update v3.5.2 I’m getting the following error:

Error executing script. Unexpected error for call_service at pos 2: module 'pychromecast' has no attribute 'get_chromecast_from_cast_info'
While executing automation automation.switch_spotcast
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1484, in _execute_service
    await self._hass.async_add_executor_job(handler.job.target, service_call)
  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 369, in start_casting
    spotify_cast_device = SpotifyCastDevice(
  File "/config/custom_components/spotcast/__init__.py", line 502, in __init__
    self.castDevice = self.getChromecastDevice(device_name)
  File "/config/custom_components/spotcast/__init__.py", line 526, in getChromecastDevice
    return pychromecast.get_chromecast_from_cast_info(
AttributeError: module 'pychromecast' has no attribute 'get_chromecast_from_cast_info'

My automation looks like this:

- service: spotcast.start
  data:
    entity_id: media_player.alle_speakers
    uri: spotify:playlist:46vPUPIAf7mjyTrJzJcjpi
    random_song: true
    shuffle: true

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
sermayoralcommented, Apr 12, 2021

Same here, after update to 3.5.2 on HA core-2021.3.4

The requirement for the 3.5.2 spotcast version is HA >= 2021.4.0

1reaction
Atiunderscorecommented, Apr 13, 2021

Same here, after update to 3.5.2 on HA core-2021.3.4

The requirement for the 3.5.2 spotcast version is HA >= 2021.4.0

Updated to the latest version of HA and works like a charm. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

module 'pychromecast' has no attribute 'get_chromecasts'
Hello, I just tried the very first example : #!/usr/bin/env python3 import pychromecast chromecasts = pychromecast.get_chromecasts() ...
Read more >
PyChromecast
Python module to talk to Google Chromecast. ... No worries, the following instructions will have you covered in exploring the possibilities.
Read more >
How to tell what methods are available in a installed module
AttributeError : module 'pychromecast' has no attribute 'get_chromehosts'. Is it that I am doing/understanding something fundamentally wrong?
Read more >
965249 - Upgrade to python3-pychromecast 7.1.1-1 breaks ...
_chromecasts_by_name = {c.name: c for c in AttributeError: 'list' object has no attribute 'name' When switching back to python3-pychromecast ...
Read more >
Google unavailable after upgrade to 0.109.x
the integration also finds the devices with no issues, but them shows as ... AttributeError: module 'pychromecast' has no attribute ...
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