Hi all,
I’m fighting some really strange errors since upgrading to supervisor-2021.12.2.
First I upgraded to supervisor-2021.12.2 then upgraded to HA core-2021.12.7, but then my BMW integration started failing to load with the error:
Logger: homeassistant.setup
Source: setup.py:153
First occurred: 17:16:28 (1 occurrences)
Last logged: 17:16:28
Setup failed for bmw_connected_drive: Unable to import component: cannot import name 'ConnectedDriveAccount' from 'bimmer_connected.account' (/usr/local/lib/python3.9/site-packages/bimmer_connected/account.py)
No amount of restarting would fix it and it was impossible to remove and re-add the integration as it threw an even more complex error when trying to remove the BMW integration.
So rolled back to my core backup taken before the upgrade which is on core-2021-12.2 however now a different integration has failed with a similar error, this time Unifi Protect:
Logger: homeassistant.setup
Source: setup.py:153
First occurred: 17:51:49 (1 occurrences)
Last logged: 17:51:49
Setup failed for unifiprotect: Unable to import component: cannot import name 'NotAuthorized' from 'pyunifiprotect' (/usr/local/lib/python3.9/site-packages/pyunifiprotect/__init__.py)
Again, no amount of restarting will fix this, the error is the same every time, and the integration cannot be removed and re-added as it throws the following error:
This error originated from a custom integration.
Logger: aiohttp.server
Source: custom_components/unifiprotect/__init__.py:23
Integration: Unifi Protect (documentation, issues)
First occurred: 19:02:28 (1 occurrences)
Last logged: 19:02:28
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 98, 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 78, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 181, 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 71, in delete
result = await hass.config_entries.async_remove(entry_id)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 831, in async_remove
await entry.async_remove(self.hass)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 487, in async_remove
component = integration.get_component()
File "/usr/src/homeassistant/homeassistant/loader.py", line 522, 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 "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/unifiprotect/__init__.py", line 23, in <module>
from pyunifiprotect import NotAuthorized, NvrError, UpvServer
ImportError: cannot import name 'NotAuthorized' from 'pyunifiprotect' (/usr/local/lib/python3.9/site-packages/pyunifiprotect/__init__.py)
Help!