Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find token seed! Did https://translate.google.com change? #42255

Closed
Mariusthvdb opened this issue Oct 23, 2020 · 1 comment · Fixed by #42405
Closed

Unable to find token seed! Did https://translate.google.com change? #42255

Mariusthvdb opened this issue Oct 23, 2020 · 1 comment · Fixed by #42405

Comments

@Mariusthvdb
Copy link
Contributor

The problem

upon updating to HA 117.0b1 this error appears in the logs when a tts action is fired

Environment

  • Home Assistant Core release with the issue: 117.0b1
  • Last working Home Assistant Core release (if known): 116.4
  • Operating environment (OS/Container/Supervised/Core): OS
  • Integration causing this issue: Google TTS
  • Link to integration documentation on our website: https://rc.home-assistant.io/integrations/google_translate/

Problem-relevant configuration.yaml

tts:
  - platform: google_translate
    service_name: google_say
    cache: false

Traceback/Error logs

Logger: homeassistant.components.automation.notify_espresso_ready
Source: components/google_translate/tts.py:126 
Integration: Automation (documentation, issues) 
First occurred: 7:38:56 AM (2 occurrences) 
Last logged: 7:38:56 AM

Notify Espresso ready: Error executing script. Unexpected error for call_service at pos 1: Unable to find token seed! Did https://translate.google.com change?
While executing automation automation.notify_espresso_ready
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 253, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 463, in _async_call_service_step
    await self._async_run_long_action(service_task)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 422, in _async_run_long_action
    long_task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1448, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1483, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 215, in service_handler
    await script_entity.async_turn_on(
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 320, in async_turn_on
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1010, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 245, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 253, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1448, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1483, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 168, in async_say_handle
    url = await tts.async_get_url(
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 341, in async_get_url
    filename = await self.async_get_tts_audio(
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 353, in async_get_tts_audio
    extension, data = await provider.async_get_tts_audio(message, language, options)
  File "/usr/src/homeassistant/homeassistant/components/google_translate/tts.py", line 126, in async_get_tts_audio
    part_token = await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/gtts_token/gtts_token.py", line 28, in calculate_token
    seed = self._get_token_key()
  File "/usr/local/lib/python3.8/site-packages/gtts_token/gtts_token.py", line 58, in _get_token_key
    raise ValueError(
ValueError: Unable to find token seed! Did https://translate.google.com change?

Additional information

@probot-home-assistant
Copy link

Hey there @awarecan, mind taking a look at this issue as its been labeled with an integration (google_translate) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants