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

cannot import name 'TRANSLATION_LOAD_LOCK' - after 2024.2.1 update #21

Closed
pejotigrek opened this issue Feb 15, 2024 · 2 comments
Closed

Comments

@pejotigrek
Copy link

pejotigrek commented Feb 15, 2024

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:

image

@pejotigrek
Copy link
Author

ok, I'm stupid. duplicate of #19, fixed in new version.

I'll let myself out ;)

@PiotrMachowski
Copy link
Owner

That was an easy fix ;)

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

No branches or pull requests

2 participants