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

Ошибка миграции #30

Open
oprokidnev opened this issue Dec 13, 2023 · 5 comments
Open

Ошибка миграции #30

oprokidnev opened this issue Dec 13, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@oprokidnev
Copy link

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/pik_intercom/__init__.py", line 363, in async_setup_entry
    return_when=asyncio.FIRST_EXCEPTION,
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 425, in wait
    raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
    ```
@alryaz
Copy link
Owner

alryaz commented Dec 13, 2023

Сегодня поправлю

@oprokidnev
Copy link
Author

oprokidnev commented Dec 13, 2023

@alryaz сорри, не до конца правильно понял процесс. Интеграция ожила после обновления до последней версии. Однако, произошла ошибка миграции.

2023-12-13 22:03:37.341 ERROR (MainThread) [homeassistant.config_entries] Error migrating entry +7 (908) 001-01-01 for pik_intercom
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 650, in async_migrate
    result = await component.async_migrate_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/pik_intercom/__init__.py", line 455, in async_migrate_entry
    async_change_device_prefix(
  File "/config/custom_components/pik_intercom/helpers.py", line 225, in async_change_device_prefix
    if first_part == DOMAIN and second_part.startswith(from_prefix):
                                ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'int' object has no attribute 'startswith'

"С нуля" интеграция заработала.

@alryaz
Copy link
Owner

alryaz commented Dec 13, 2023

@alryaz сорри, не до конца правильно понял процесс. Интеграция ожила после обновления до последней версии. Однако, произошла ошибка миграции.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 650, in async_migrate
    result = await component.async_migrate_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/pik_intercom/__init__.py", line 455, in async_migrate_entry
    async_change_device_prefix(
  File "/config/custom_components/pik_intercom/helpers.py", line 225, in async_change_device_prefix
    if first_part == DOMAIN and second_part.startswith(from_prefix):

Ошибка скопирована не полностью

@alryaz alryaz added the bug Something isn't working label Dec 13, 2023
@alryaz alryaz changed the title Интеграция сломана для HA 2023.12.1 Ошибка миграции Dec 13, 2023
@alryaz
Copy link
Owner

alryaz commented Dec 13, 2023

@oprokidnev С какой версии Вы обновлялись?

@oprokidnev
Copy link
Author

oprokidnev commented Dec 13, 2023

@alryaz c актуальной для HA 2023.3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants