core icon indicating copy to clipboard operation
core copied to clipboard

Error in log playng sound pychromecast.error.PyChromecastError

Open antoweb opened this issue 2 years ago • 8 comments

The problem

I receive this error in log

2022-06-08 09:58:03 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.play_media (c:01G5153TD9ZMVRZYC3C8RGQAP6): entity_id=['media_player.cameretta'], e xtra=, media_type=audio/mp3, media_id=https://MY-HASSIO-URL/local/slow-spring-board-longer-tail.mp3> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/core.py", line 1722, in catch_exceptions await coro_or_task File "/usr/src/homeassistant/homeassistant/core.py", line 1741, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service await service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 680, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 717, in _handle_entity_call await result File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 717, in async_play_media await self.hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.9/site-packages/pychromecast/quick_play.py", line 77, in quick_play controller.quick_play(**data) File "/usr/local/lib/python3.9/site-packages/pychromecast/controllers/media.py", line 544, in quick_play raise PyChromecastError() pychromecast.error.PyChromecastError

What version of Home Assistant Core has the issue?

2022.6.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

antoweb avatar Jun 08 '22 14:06 antoweb

cast documentation cast source (message by IssueLinks)

Hey there @emontnemery, mind taking a look at this issue as it has been labeled with an integration (cast) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

Face the same issue. TTS (Google Cloud) worked until 2022.5 without issues. Now it occasionally works and if not the above error is logged.

Rikkie80 avatar Jun 12 '22 06:06 Rikkie80

I've the same error (unsure if its the same issue), but when casting media (morning alarm clock mp3 in my case) to one particular display (first gen Google Home Hub), it has a massive 10 second delay between it making the chromecast tone to indicate its playing, and then actually playing. This Google Home for whatever reason seems to require to make DNS queries to both the internal DNS server and its hardcoded 8.8.8.8 which I am blocking the later. It seems to need to get a reponse back from the Google DNS server before it starts playing, or it waits for a timeout. If I remove the DNS blocking on this particular Google Home, it works as the others do (even though they have 8.8.8.8 blocked).

To reiterate, it still plays the media, just with massive delay.

2022-06-13 10:00:40 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.play_media (c:01G5D7G7489YF6N31J2WS2CP4X): entity_id=['media_player.master_bedroom_display'], extra=, media_type=audio/mp3, media_id=http://ha.pi-blue.localdomain/local/tornado_siren.mp3>
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1722, in catch_exceptions
    await coro_or_task
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1741, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 680, in entity_service_call
    future.result()  # pop exception if have
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 964, in async_request_call
    await coro
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 717, in _handle_entity_call
    await result
  File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/cast/media_player.py", line 717, in async_play_media
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.9/site-packages/pychromecast/quick_play.py", line 77, in quick_play
    controller.quick_play(**data)
  File "/srv/homeassistant/lib/python3.9/site-packages/pychromecast/controllers/media.py", line 544, in quick_play
    raise PyChromecastError()
pychromecast.error.PyChromecastError

callifo avatar Jun 13 '22 02:06 callifo

Duplicate of https://github.com/home-assistant/core/issues/72840 (even that the title of that issue doesn't really say so)

hmmbob avatar Jun 15 '22 09:06 hmmbob

I get a similar message every day first time when my automation starts to show lovelace dashboard on my nest hub gen 2

Logger: homeassistant.util.logging Source: util/logging.py:116 First occurred: 06:00:38 (1 occurrences) Last logged: 06:00:38

Exception in _handle_signal_show_view when dispatching 'cast_show_view': (<pychromecast.controllers.homeassistant.HomeAssistantController object at 0xffff7ec39180>, 'media_player.nesthubc1c1_2', '0', None) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 967, in _handle_signal_show_view self._hass_cast_controller.show_lovelace_view(view_path, url_path) File "/usr/local/lib/python3.10/site-packages/pychromecast/controllers/homeassistant.py", line 119, in show_lovelace_view self._send_connected_message( File "/usr/local/lib/python3.10/site-packages/pychromecast/controllers/homeassistant.py", line 130, in _send_connected_message self._connect_hass( File "/usr/local/lib/python3.10/site-packages/pychromecast/controllers/homeassistant.py", line 103, in _connect_hass raise PyChromecastError() pychromecast.error.PyChromecastError

smarthomefamilyverrips avatar Jul 19 '22 04:07 smarthomefamilyverrips

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Oct 24 '22 17:10 github-actions[bot]

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Error still exists for me unfortunately

smarthomefamilyverrips avatar Oct 24 '22 17:10 smarthomefamilyverrips

An issue for me too. I get the notification sound on the Google Nest Hub, but no speech.

PEHowland avatar Nov 24 '22 20:11 PEHowland

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Still get same error

smarthomefamilyverrips avatar Feb 22 '23 21:02 smarthomefamilyverrips

get this error also

olyashok avatar Feb 27 '23 18:02 olyashok

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.