petrleocompel / hikaxpro_hacs

HACS repository of Hikvision Ax Pro integration for home assistant
MIT License
40 stars 4 forks source link

Can't configure the module after reinstall #65

Closed idealser closed 1 year ago

idealser commented 1 year ago

Cleared everything related with Hikvision Ax Pro and made a new install via HACS. Now I'm getting following error:

2023-08-07 18:41:27.149 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.hikvision_axpro.config_flow
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 833, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 850, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/hikvision_axpro/__init__.py", line 129, in <module>
    class HikAxProDataUpdateCoordinator(DataUpdateCoordinator):
  File "/config/custom_components/hikvision_axpro/__init__.py", line 131, in HikAxProDataUpdateCoordinator
    axpro: hikaxpro.HikAxPro | hikax.HikAx
           ^^^^^^^^^^^^^^^^^
AttributeError: module 'hikaxpro' has no attribute 'HikAxPro'

Any ideas what's happening?

idealser commented 1 year ago

Cleared integration once again and updated HA to the latest version. Works now

petrleocompel commented 1 year ago

Seems like installation issue. Just to clear that up. like API module did not install properly.