gvigroux / hon

Support of all Haier, Candy, Hoover appliances integrated in the official hOn mobile app. Direct access to all possible services and parameters
MIT License
118 stars 45 forks source link

ModuleNotFoundError: нет модуля с именем «imp» #121

Closed djvariado closed 4 months ago

djvariado commented 4 months ago

при запуске HA не запускается интеграция в логах следующая ошибка:

Ошибка установки для пользовательской интеграции «hon»: невозможно импортировать компонент: нет модуля с именем «imp». Traceback (последний вызов): файл «/usr/src/homeassistant/homeassistant/setup.py», строка 251, в компоненте _async_setup_comComponent = Integration.get_comComponent() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Файл "/usr/src/homeassistant/homeassistant/loader.py", строка 827, в get_comComponent ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ Файл "/usr/local/lib/python3.12/importlib/ init .py", строка 90, в import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Файл "", строка 1387 , в файле _gcd_import "", строка 1360, в файле _find_and_load "", строка 1331, в файле _find_and_load_unlocked "", строка 935, в файле _load_unlocked "", строка 994, в файле exec_module "", строка 488, в файле _call_with_frames_removed " /config/custom_comComponents/hon/init.py ", строка 2, в импорте имп ModuleNotFoundError: нет модуля с именем "imp"

slegars56 commented 4 months ago

Same issue here with HA Core 2024.2:

Logger: homeassistant.setup Source: setup.py:251 First occurred: 21:48:58 (1 occurrences) Last logged: 21:48:58

Setup failed for custom integration 'hon': Unable to import component: No module named 'imp' 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 "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 994, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/hon/init.py", line 2, in import imp ModuleNotFoundError: No module named 'imp'

arjanvanleent commented 4 months ago

Had the same issue did a rollback to HA 2024.1.6

sirfalo commented 4 months ago

I can confirm, I have exactly the same issue... Revert to 2024.1.5.

slegars56 commented 4 months ago

Quick and dirty workaround: comment the line 2 in your HA folder /custom_components/hon/init.py. (do not import imp that seems depreciated in the python version used in HA 2024.2). I've no clue about the side effects.

driagi commented 4 months ago

Same problem with Core 2024.2.0:


2024-02-08 08:33:05.601 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'hon': Unable to import component: No module named 'imp' 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 "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 994, in exec_module File "", line 488, in _call_with_frames_removed File "/config/custom_components/hon/init.py", line 2, in import imp ModuleNotFoundError: No module named 'imp'

gvigroux commented 4 months ago

I'm updating to the latest HA and I will test

MaxBallanti commented 4 months ago

Core 2024.2.0 Supervisor 2024.01.1 Logger: homeassistant.config_entries Source: config_entries.py:2247 First occurred: 7 febbraio 2024 alle ore 22:29:17 (2 occurrences) Last logged: 7 febbraio 2024 alle ore 22:33:48

Error occurred loading flow for integration hon: No module named 'imp'

gvigroux commented 4 months ago

Done :). Last version should work

MaxBallanti commented 4 months ago

Done :). Last version should work

thanks everything works !

driagi commented 4 months ago

Done :). Last version should work

Everything working. You're great.

driagi commented 4 months ago

Done :). Last version should work

thanks everything works !

last version of what^ HA? Because I've just updated HA to 2024.2.1 and the problem is still present in hon integration.

Last version of Hon and core HA 2024.2.x (se preferisci, devi installare l'ultima versione di Hon per toglierti il problema)

robertomontinaro80 commented 4 months ago

Done :). Last version should work

thanks everything works !

last version of what^ HA? Because I've just updated HA to 2024.2.1 and the problem is still present in hon integration.

Last version of Hon and core HA 2024.2.x (se preferisci, devi installare l'ultima versione di Hon per toglierti il problema)

Sorry everything works fine thank you all

gvigroux commented 4 months ago

:)