cannot import name 'TRANSLATION_LOAD_LOCK' - after 2024.2.1 update
Closed this issue · 2 comments
pejotigrek commented
just updated to current HA version - 2024.2.1 (installation type: container), and this pops up in the log:
2024-02-15 11:32:52.528 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'custom_templates': Unable to import component: cannot import name 'TRANSLATION_LOAD_LOCK' from 'homeassistant.helpers.translation' (/usr/src/homeassistant/homeassistant/helpers/translation.py)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 251, in _async_setup_component
component = integration.get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 827, in get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 994, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/config/custom_components/custom_templates/__init__.py", line 11, in <module>
from homeassistant.helpers.translation import _TranslationCache, TRANSLATION_FLATTEN_CACHE, TRANSLATION_LOAD_LOCK
ImportError: cannot import name 'TRANSLATION_LOAD_LOCK' from 'homeassistant.helpers.translation' (/usr/src/homeassistant/homeassistant/helpers/translation.py)
in the dev tools also:
pejotigrek commented
ok, I'm stupid. duplicate of #19, fixed in new version.
I'll let myself out ;)
PiotrMachowski commented
That was an easy fix ;)