Skip to content
New issue

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

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

Already on GitHub? # to your account

ImportError: cannot import name 'ConversationEntityFeature' #579

Closed
nevian-spb opened this issue Nov 24, 2024 · 14 comments
Closed

ImportError: cannot import name 'ConversationEntityFeature' #579

nevian-spb opened this issue Nov 24, 2024 · 14 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@nevian-spb
Copy link

После обновления на 3.17 интеграция отвалилась с ошибкой

"Не удалось настроить: Проверить журналы"
Помог откат на 3.15

@AlexxIT AlexxIT added the question Further information is requested label Nov 24, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Nov 24, 2024

Журналы проверяли?

@Suhars
Copy link

Suhars commented Nov 26, 2024

Такая же проблема. Откат не помог.
В логах вот такая ошибка
Login with token error: {'status': 'error', 'errors': ['oauth_token.invalid']}
Интеграция предлагает перелогиниться, но при входе получаю ошибку
not_implemented

@AlexxIT
Copy link
Owner

AlexxIT commented Nov 26, 2024

Подробнее ошибку можно? Именно так, как она выглядит в логах.

@Suhars
Copy link

Suhars commented Nov 26, 2024

Эта ошибка возникла в пользовательской интеграции.

Регистратор: custom_components.yandex_station.core.yandex_session
Источник: custom_components/yandex_station/core/yandex_session.py:397
интеграция: Yandex.Station (документация, проблемы)
Первое сообщение: 20:03:18 (1 сообщений)
Последнее сообщение: 20:03:18

Login with token error: {'status': 'error', 'errors': ['oauth_token.invalid']}

@AlexxIT
Copy link
Owner

AlexxIT commented Nov 27, 2024

  1. С oauth_token.invalid всё понятно. Погиб токен. Вероятно сменили пароль на аккаунт или другое аналогичное действие
  2. Нужны подробности по not_implemented. И желательно поробности из лога, чтоб были упоминания строк кода, где возникла ошибка.

@Spynet1978
Copy link

Spynet1978 commented Nov 29, 2024

После обновления на 3,17 в журнале:

Регистратор: homeassistant.config_entries
Источник: config_entries.py:586
Первое сообщение: 28 ноября 2024 г. в 20:49:26 (6 сообщений)
Последнее сообщение: 17:12:25

Error setting up entry spynet1978 for yandex_station
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/yandex_station/__init__.py", line 183, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(entry, platforms)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2046, in async_forward_entry_setups
    await integration.async_get_platforms(platforms)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1177, in async_get_platforms
    import_future.result()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1177, in async_get_platforms
    import_future.result()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1177, in async_get_platforms
    import_future.result()
  [Previous line repeated 2 more times]
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1165, in async_get_platforms
    platforms.update(self._load_platforms(platform_names))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1090, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1296, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  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 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/yandex_station/conversation.py", line 3, in <module>
    from homeassistant.components.conversation import (
ImportError: cannot import name 'ConversationEntityFeature' from 'homeassistant.components.conversation' (/usr/src/homeassistant/homeassistant/components/conversation/__init__.py)

П.С. Откат на 3.15 помог.

@AlexxIT
Copy link
Owner

AlexxIT commented Nov 29, 2024

У вас три совершенно разных и не связанных с собой ошибки. Покажите диагностику интеграции или любого устройства интеграции.

@Spynet1978
Copy link

@AlexxIT AlexxIT self-assigned this Dec 1, 2024
@martrix78
Copy link

martrix78 commented Dec 1, 2024

та же ошибка, откатился на старую версию

@AlexxIT
Copy link
Owner

AlexxIT commented Dec 1, 2024

Та же, это какая? Выше было три разные ошибки.

@aunoor
Copy link

aunoor commented Dec 1, 2024

Я получил такую же ошибку как у @Spynet1978 при попытки использовать компонент версии 3.17.1. Откатился на 3.15.1.
Причина ошибки в моем случае: класс ConversationEntityFeature отсутствует в версии HA 2024.7.3.

@FerrumLogic
Copy link

На HA Core 2024.5.5 тоже не завелась версия 3.17.1, ругалась на ConversationEntityFeature. Помог откат на 3.15.1.
Думаю имеет смысл добавить проверку на версию HA при обновлении компонента.

@AlexxIT
Copy link
Owner

AlexxIT commented Dec 4, 2024

Проверка была, только она смотрела на неправильную версию.

@AlexxIT AlexxIT added bug Something isn't working and removed question Further information is requested labels Dec 4, 2024
@AlexxIT AlexxIT changed the title Не удалось настроить: Проверить журналы ImportError: cannot import name 'ConversationEntityFeature' Dec 4, 2024
@AlexxIT AlexxIT added this to the v3.17.2 milestone Dec 4, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Dec 24, 2024

@AlexxIT AlexxIT closed this as completed Dec 24, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants