Google TTS, Broken? After 59.x

Upgraded to 59.1 and I have ran into an issue with Google TTS. Here is what the log is stating:

2017-12-05 19:11:25 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py”, line 410, in start
resp = yield from self._request_handler(request)
File “/usr/local/lib/python3.6/site-packages/aiohttp/web.py”, line 326, in _handle
resp = yield from handler(request)
File “/usr/local/lib/python3.6/site-packages/aiohttp/web_middlewares.py”, line 93, in impl
return (yield from handler(request))
File “/usr/src/app/homeassistant/components/http/ban.py”, line 58, in ban_middleware
return (yield from handler(request))
File “/usr/local/lib/python3.6/asyncio/coroutines.py”, line 213, in coro
res = yield from res
File “/usr/local/lib/python3.6/asyncio/coroutines.py”, line 213, in coro
res = yield from res
File “/usr/src/app/homeassistant/components/http/init.py”, line 430, in handle
result = yield from result
File “/usr/src/app/homeassistant/components/media_player/init.py”, line 956, in get
data, content_type = yield from player.async_get_media_image()
File “/usr/src/app/homeassistant/components/media_player/init.py”, line 505, in async_get_media_image
return (yield from _async_fetch_image(self.hass, url))
File “/usr/src/app/homeassistant/components/media_player/init.py”, line 916, in _async_fetch_image
content = yield from response.read()
File “/usr/local/lib/python3.6/site-packages/aiohttp/client_reqrep.py”, line 746, in read
self._content = yield from self.content.read()
File “/usr/local/lib/python3.6/site-packages/aiohttp/streams.py”, line 607, in read
return (yield from super().read(n))
File “/usr/local/lib/python3.6/site-packages/aiohttp/streams.py”, line 323, in read
block = yield from self.readany()
File “/usr/local/lib/python3.6/site-packages/aiohttp/streams.py”, line 623, in readany
return (yield from super().readany())
File “/usr/local/lib/python3.6/site-packages/aiohttp/streams.py”, line 340, in readany
yield from self._wait(‘readany’)
File “/usr/local/lib/python3.6/site-packages/aiohttp/streams.py”, line 259, in _wait
yield from waiter
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed
2017-12-05 19:17:26 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 182, in _step
result = coro.throw(exc)
File “/usr/src/app/homeassistant/core.py”, line 1031, in _event_to_service_call
yield from service_handler.func(service_call)
File “/usr/src/app/homeassistant/components/media_player/init.py”, line 408, in async_service_handler
yield from getattr(player, method[‘method’])(**params)
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/media_player/cast.py”, line 315, in play_media
self.cast.media_controller.play_media(media_id, media_type)
File “/usr/local/lib/python3.6/site-packages/pychromecast/controllers/media.py”, line 465, in play_media
callback_function=app_launched_callback)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 803, in launch_app
self.update_status(lambda response:
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 794, in update_status
callback_function=callback_function_param)
File “/usr/local/lib/python3.6/site-packages/pychromecast/controllers/init.py”, line 84, in send_message
self.namespace, data, inc_session_id, callback_function)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 603, in send_platform_message
inc_session_id, callback_function_param)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 597, in send_message
raise NotConnected(“Chromecast is connecting…”)
pychromecast.error.NotConnected: Chromecast is connecting…
2017-12-05 19:17:30 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 182, in _step
result = coro.throw(exc)
File “/usr/src/app/homeassistant/core.py”, line 1031, in _event_to_service_call
yield from service_handler.func(service_call)
File “/usr/src/app/homeassistant/components/media_player/init.py”, line 408, in async_service_handler
yield from getattr(player, method[‘method’])(**params)
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/media_player/cast.py”, line 275, in turn_on
CAST_SPLASH, pychromecast.STREAM_TYPE_BUFFERED)
File “/usr/local/lib/python3.6/site-packages/pychromecast/controllers/media.py”, line 465, in play_media
callback_function=app_launched_callback)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 803, in launch_app
self.update_status(lambda response:
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 794, in update_status
callback_function=callback_function_param)
File “/usr/local/lib/python3.6/site-packages/pychromecast/controllers/init.py”, line 84, in send_message
self.namespace, data, inc_session_id, callback_function)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 603, in send_platform_message
inc_session_id, callback_function_param)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 597, in send_message
raise NotConnected(“Chromecast is connecting…”)
pychromecast.error.NotConnected: Chromecast is connecting…
2017-12-05 19:17:35 ERROR (MainThread) [homeassistant.components.tts.google] Error 404 on load url http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=&tk=911972.754517&total=1&idx=0&client=tw-ob&textlen=0
2017-12-05 19:17:35 ERROR (MainThread) [homeassistant.components.tts] Error on init tts: No TTS from google for ‘’
2017-12-05 19:17:37 ERROR (MainThread) [homeassistant.components.tts.google] Error 404 on load url http://translate.google.com/translate_tts?ie=UTF-8&tl=en&q=&tk=911972.754517&total=1&idx=0&client=tw-ob&textlen=0
2017-12-05 19:17:37 ERROR (MainThread) [homeassistant.components.tts] Error on init tts: No TTS from google for ‘’
2017-12-05 19:17:57 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 182, in _step
result = coro.throw(exc)
File “/usr/src/app/homeassistant/core.py”, line 1031, in _event_to_service_call
yield from service_handler.func(service_call)
File “/usr/src/app/homeassistant/components/media_player/init.py”, line 408, in async_service_handler
yield from getattr(player, method[‘method’])(**params)
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/media_player/cast.py”, line 315, in play_media
self.cast.media_controller.play_media(media_id, media_type)
File “/usr/local/lib/python3.6/site-packages/pychromecast/controllers/media.py”, line 465, in play_media
callback_function=app_launched_callback)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 803, in launch_app
self.update_status(lambda response:
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 794, in update_status
callback_function=callback_function_param)
File “/usr/local/lib/python3.6/site-packages/pychromecast/controllers/init.py”, line 84, in send_message
self.namespace, data, inc_session_id, callback_function)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 603, in send_platform_message
inc_session_id, callback_function_param)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 597, in send_message
raise NotConnected(“Chromecast is connecting…”)
pychromecast.error.NotConnected: Chromecast is connecting…
2017-12-05 19:18:05 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 182, in _step
result = coro.throw(exc)
File “/usr/src/app/homeassistant/core.py”, line 1031, in _event_to_service_call
yield from service_handler.func(service_call)
File “/usr/src/app/homeassistant/components/media_player/init.py”, line 408, in async_service_handler
yield from getattr(player, method[‘method’])(**params)
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/media_player/cast.py”, line 315, in play_media
self.cast.media_controller.play_media(media_id, media_type)
File “/usr/local/lib/python3.6/site-packages/pychromecast/controllers/media.py”, line 465, in play_media
callback_function=app_launched_callback)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 803, in launch_app
self.update_status(lambda response:
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 794, in update_status
callback_function=callback_function_param)
File “/usr/local/lib/python3.6/site-packages/pychromecast/controllers/init.py”, line 84, in send_message
self.namespace, data, inc_session_id, callback_function)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 603, in send_platform_message
inc_session_id, callback_function_param)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 597, in send_message
raise NotConnected(“Chromecast is connecting…”)
pychromecast.error.NotConnected: Chromecast is connecting…
2017-12-05 19:19:11 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 182, in _step
result = coro.throw(exc)
File “/usr/src/app/homeassistant/core.py”, line 1031, in _event_to_service_call
yield from service_handler.func(service_call)
File “/usr/src/app/homeassistant/components/media_player/init.py”, line 408, in async_service_handler
yield from getattr(player, method[‘method’])(**params)
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/media_player/cast.py”, line 315, in play_media
self.cast.media_controller.play_media(media_id, media_type)
File “/usr/local/lib/python3.6/site-packages/pychromecast/controllers/media.py”, line 465, in play_media
callback_function=app_launched_callback)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 803, in launch_app
self.update_status(lambda response:
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 794, in update_status
callback_function=callback_function_param)
File “/usr/local/lib/python3.6/site-packages/pychromecast/controllers/init.py”, line 84, in send_message
self.namespace, data, inc_session_id, callback_function)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 603, in send_platform_message
inc_session_id, callback_function_param)
File “/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py”, line 597, in send_message
raise NotConnected(“Chromecast is connecting…”)
pychromecast.error.NotConnected: Chromecast is connecting…

Any ideas would be appreciated.

There’s an open issue on GitHub about this with a lot of head scratching going on.

I just reverted to 0.58.1 until its resolved

Fixed in 59.2
Devs were all over it, well done

I’m on 59.2 but still see an issue.
I’m not sure why it reoccurs but I restart HASS and a couple of my devices then it comes back.

Here’s what I get when I send text from the UI

2017-12-07 19:55:51 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
    result = coro.throw(exc)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/core.py", line 1031, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/media_player/__init__.py", line 408, in async_service_handler
    yield from getattr(player, method['method'])(**params)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/media_player/cast.py", line 317, in play_media
    self.cast.media_controller.play_media(media_id, media_type)
  File "/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/controllers/media.py", line 465, in play_media
    callback_function=app_launched_callback)
  File "/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/socket_client.py", line 803, in launch_app
    self.update_status(lambda response:
  File "/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/socket_client.py", line 794, in update_status
    callback_function=callback_function_param)
  File "/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/controllers/__init__.py", line 84, in send_message
    self.namespace, data, inc_session_id, callback_function)
  File "/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/socket_client.py", line 603, in send_platform_message
    inc_session_id, callback_function_param)
  File "/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/socket_client.py", line 597, in send_message
    raise NotConnected("Chromecast is connecting...")
pychromecast.error.NotConnected: Chromecast is connecting...

I got it working again

59.2 is supposed to revert back to the last working version of pychromecast, but it didn’t for me.
I had to force the install of version 0.8.2 of pychromecast

sudo pip3 -install pychromecast==0.8.2

before the forced install, I had

pi@raspberrypi:~/.homeassistant $ sudo pip3 show pychromecast
Name: PyChromecast
Version: 1.0.2

after, it showed

pi@raspberrypi:~/.homeassistant $ sudo pip3 show pychromecast
Name: PyChromecast
Version: 0.8.2

nevermind… This only worked for a bit so there may be something else going on.
I still get the following error

2017-12-21 08:52:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 241, in _step
result = coro.throw(exc)
File “/usr/local/lib/python3.5/dist-packages/homeassistant/core.py”, line 1031, in _event_to_service_call
yield from service_handler.func(service_call)
File “/usr/local/lib/python3.5/dist-packages/homeassistant/components/media_player/init.py”, line 408, in async_service_handler
yield from getattr(player, method[‘method’])(**params)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.5/dist-packages/homeassistant/components/media_player/cast.py”, line 317, in play_media
self.cast.media_controller.play_media(media_id, media_type)
File “/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/controllers/media.py”, line 465, in play_media
callback_function=app_launched_callback)
File “/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/socket_client.py”, line 803, in launch_app
self.update_status(lambda response:
File “/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/socket_client.py”, line 794, in update_status
callback_function=callback_function_param)
File “/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/controllers/init.py”, line 84, in send_message
self.namespace, data, inc_session_id, callback_function)
File “/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/socket_client.py”, line 603, in send_platform_message
inc_session_id, callback_function_param)
File “/home/pi/.homeassistant/deps/lib/python3.5/site-packages/pychromecast/socket_client.py”, line 597, in send_message
raise NotConnected(“Chromecast is connecting…”)
pychromecast.error.NotConnected: Chromecast is connecting…

My Chromecast Audios and Google Home and Google Home Mini still aren’t showing up. Starting to wonder if it’s just me.

Not just you. I haven’t had working Cast media players all month.

1 Like

I’m NOT using SSL but I’m having the same issue as described in the following:

“When SSL is enabled the Google Home will make a ding the very first time after HASS is restarted and a google_say command is sent to it, but it will never play the text (mp3). After that first ding, it ignores all subsequent commands without response or log. Debug shows it is receiving the commands and its state changes as a result.”