Closed djvariado closed 9 months ago
hi, same problem
Setup failed for custom integration 'xiaomi_miot': 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 "
Same error
This integration never used 'imp'. You probably use the old one from gvigroux, see gvigroux/hon#121
same problem here. Please fix it.
@robertomontinaro80 use python 3.11 as a workaround
how can we use python 3.11?
how can we use python 3.11?
install python 3.11 from python.org and use it as your programming interpreter in your programming environment, idk what u use to code (i use pycharm)
@robertomontinaro80 use python 3.11 as a workaround
Sorry but I found a fork of the same integration which is maintained and available via hacs. I installed it and everything working fine for now. I'm currently using this https://github.com/gvigroux/hon
the issue is the import imp
in the init.py if you repleace it with import importlib
it should work. Or switch to https://github.com/gvigroux/hon
I still got the error "ModuleNotFoundError: No module named 'imp'" even though I am using Python 3.11.7. Do you have any ideas why?
при запуске HA не запускается интеграция в логах следующая ошибка:
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'