core icon indicating copy to clipboard operation
core copied to clipboard

mistake translation Error doing job: Task exception was never retrieved

Open malinovsku opened this issue 1 year ago • 10 comments

The problem

after launch, errors occur in the logs, there is no text and system names instead of translations, the Russian language is selected in the settings Снимок экрана 2024-02-08 в 00 18 20 Снимок экрана 2024-02-08 в 00 17 41

What version of Home Assistant Core has the issue?

2024.2.0

What was the last working version of Home Assistant Core?

2024.1.6

What type of installation are you running?

Home Assistant OS

Integration causing the issue

translation

Link to integration documentation on our website

https://developers.home-assistant.io/docs/translations/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant
Source: helpers/translation.py:276
First occurred: 00:11:05 (62 occurrences)
Last logged: 00:11:24

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/custom_templates/__init__.py", line 275, in load_translations
    await load_translations_to_cache(hass, language)
  File "/config/custom_components/custom_templates/__init__.py", line 239, in load_translations_to_cache
    await cache.async_fetch(language, "entity", components_entities)
  File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 219, in async_fetch
    await self._async_load(language, components_to_load)
  File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 257, in _async_load
    self._build_category_cache(language, components, translation_strings)
  File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 333, in _build_category_cache
    resources_flatten = self._validate_placeholders(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 276, in _validate_placeholders
    tuples = list(string.Formatter().parse(value))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: unexpected '{' in field name

Additional information

No response

malinovsku avatar Feb 07 '24 21:02 malinovsku

Same problem

SerkanAkcadag avatar Feb 07 '24 23:02 SerkanAkcadag

config/custom_components/custom_templates/__init__.py

This is a custom component, which is not maintained by the HA core project. Please report your issue to the maintainer or in the source repository of this custom component. Thx 👍

mib1185 avatar Feb 07 '24 23:02 mib1185

Logger: homeassistant.components.websocket_api.http.connection
Source: helpers/translation.py:276
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 11:35:16 (89 occurrences)
Last logged: 11:45:23

[140310845985984] Error handling message: Unknown error (unknown_error) Alexander from ip (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36)
[140310953296448] Error handling message: Unknown error (unknown_error) Alexander from ip (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36)
[140309875066048] Error handling message: Unknown error (unknown_error) Alexander from ip (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/frontend/__init__.py", line 734, in websocket_get_translations
    resources = await async_get_translations(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 372, in async_get_translations
    return await cache.async_fetch(language, category, components)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 219, in async_fetch
    await self._async_load(language, components_to_load)
  File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 257, in _async_load
    self._build_category_cache(language, components, translation_strings)
  File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 333, in _build_category_cache
    resources_flatten = self._validate_placeholders(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 276, in _validate_placeholders
    tuples = list(string.Formatter().parse(value))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: unexpected '{' in field name

avbor avatar Feb 08 '24 08:02 avbor

image none of this sounds like a problem in the custom components....

avbor avatar Feb 08 '24 08:02 avbor

@avbor can you create a separate issue?

joostlek avatar Feb 08 '24 09:02 joostlek

@joostlek yes, but i already rollback to 2024.1.6

avbor avatar Feb 08 '24 09:02 avbor

Doesn't matter, please include the logs, language you're using, maybe any custom components and or cards

joostlek avatar Feb 08 '24 09:02 joostlek

@joostlek here it is - https://github.com/home-assistant/core/issues/109967

avbor avatar Feb 08 '24 09:02 avbor

@mib1185 completely removing the component custom_templates from the custom folder did not solve the problem, in safe mode and immediately after downloading there are translations, and the list of integrations is ok Снимок экрана 2024-02-08 в 21 23 51 Снимок экрана 2024-02-08 в 21 24 41

but then everything disappears and there is nothing in the logs at the same time

Снимок экрана 2024-02-08 в 21 25 05 and integration with system names, not user names Снимок экрана 2024-02-08 в 21 25 43

malinovsku avatar Feb 08 '24 18:02 malinovsku

I will add that there are errors in the log

Logger: homeassistant.components.websocket_api.http.connection Source: helpers/translation.py:276 Integration: websocket_api (documentation, issues) First occurred: 21:57:18 (236 occurrences) Last logged: 22:14:50 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/frontend/init.py", line 734, in websocket_get_translations resources = await async_get_translations( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 372, in async_get_translations return await cache.async_fetch(language, category, components) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 219, in async_fetch await self._async_load(language, components_to_load) File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 257, in _async_load self._build_category_cache(language, components, translation_strings) File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 333, in _build_category_cache resources_flatten = self._validate_placeholders( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/translation.py", line 276, in _validate_placeholders tuples = list(string.Formatter().parse(value)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: unexpected '{' in field name

malinovsku avatar Feb 08 '24 19:02 malinovsku

at all, please update to 2024.2.1 (as soon as it is available) - it will log error messages about the malformed strings, so we can fix them later

mib1185 avatar Feb 09 '24 08:02 mib1185

Please update to 2024.2.1 and check if you now see "Error while parsing localized" messages and provide them.

mib1185 avatar Feb 09 '24 12:02 mib1185

Logger: homeassistant.helpers.translation
Source: helpers/translation.py:279
First occurred: 15:47:16 (1 occurrences)
Last logged: 15:47:16

Error while parsing localized (ru) string component.spook.issues.script_unknown_entity_references.description

it looks like it's a spook: image

avbor avatar Feb 11 '24 12:02 avbor

@malinovsku do you mind to give us an update?

mib1185 avatar Feb 11 '24 13:02 mib1185

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.