elad-bar / ha-edgeos

Integration with EdgeOS (Ubiquiti)
133 stars 24 forks source link

Not loading and unable to reinstall. #63

Closed TheModin closed 2 years ago

TheModin commented 2 years ago

Hi. Running Home Assistant 2022.2.2 and 1.1.8 of edgeos integration.

The integration has stopped working for me and is stuck in a not loading state: image

Tried to uninstall the integration but nothing happens, get the following in the log when trying: 2022-02-06 22:18:57 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 72, in delete result = await hass.config_entries.async_remove(entry_id) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 848, in async_remove await entry.async_remove(self.hass) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 502, in async_remove component = integration.get_component() File "/usr/src/homeassistant/homeassistant/loader.py", line 547, in get_component cache[self.domain] = importlib.import_module(self.pkg_path) File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/config/custom_components/None/__init__.py", line 12, in from .helpers import async_set_ha, clear_ha, get_ha, handle_log_level File "/config/custom_components/None/helpers/__init__.py", line 7, in from ..managers.home_assistant import EdgeOSHomeAssistant File "/config/custom_components/None/managers/home_assistant.py", line 21, in from .data_manager import EdgeOSData File "/config/custom_components/None/managers/data_manager.py", line 11, in from custom_components.edgeos.clients import SessionTerminatedException ImportError: cannot import name 'SessionTerminatedException' from 'custom_components.edgeos.clients' (/config/custom_components/edgeos/clients/__init__.py)

If I try to add the integration again I get the following in the log: 2022-02-06 22:21:38 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration edgeos: cannot import name 'SessionTerminatedException' from 'custom_components.edgeos.clients' (/config/custom_components/edgeos/clients/__init__.py)

TheModin commented 2 years ago

I managed to solve this by reverting "custom_components/edgeos/clients/init.py" to the previous version and rebooted. Then I could remove the integration in Home Assistant and also remove it in HACS.

elad-bar commented 2 years ago

not sure I understand, did you fixed it by reinstall?

TheModin commented 2 years ago

not sure I understand, did you fixed it by reinstall?

No, that file is empty in the latest releases. I just copy the content of the latest release before that file became 0. Then it works. Only problem is that I have to redo the process every time there is a new release ;)

elad-bar commented 2 years ago

seems like an issue with the HACS installer, not related to the component