Unable to upgrade from version 0.3.10 to 0.5.0b7
Closed this issue · 2 comments
I'm not sure what I am doing wrong. When I try to update to the beta version using HACS, after Home Assistant restarts, the Life360 integration fails to load. I get a message 'Invalid Config' and to check the logs.
There are two errors that show up. The first error shows "Setup failed for custom integration 'life360': Unable to import component: cannot import name 'NotModified' from 'life360 (/config/life360/init.py)
The log shows the following:
Logger: homeassistant.setup
Source: setup.py:322
First occurred: 2:27:28 PM (1 occurrences)
Last logged: 2:27:28 PM
Setup failed for custom integration 'life360': Unable to import component: cannot import name 'NotModified' from 'life360' (/config/life360/init.py)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 986, in async_get_component
comp = await self.hass.async_add_import_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1046, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 144, in protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
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 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/life360/init.py", line 29, in
from .coordinator import (
File "/config/custom_components/life360/coordinator.py", line 17, in
from life360 import Life360Error, LoginError, NotModified, RateLimited
ImportError: cannot import name 'NotModified' from 'life360' (/config/life360/init.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 322, in _async_setup_component
component = await integration.async_get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1006, in async_get_component
self._component_future.result()
File "/usr/src/homeassistant/homeassistant/loader.py", line 998, in async_get_component
comp = self._get_component()
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1046, in _get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 144, in protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
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 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/config/custom_components/life360/init.py", line 29, in
from .coordinator import (
File "/config/custom_components/life360/coordinator.py", line 17, in
from life360 import Life360Error, LoginError, NotModified, RateLimited
ImportError: cannot import name 'NotModified' from 'life360' (/config/life360/init.py)
The second error shows the following:
and, the log shows the following:
Logger: homeassistant.util.loop
Source: util/loop.py:70
First occurred: 2:27:28 PM (1 occurrences)
Last logged: 2:27:28 PM
Detected blocking call to import_module with args ('custom_components.life360',) in /usr/src/homeassistant/homeassistant/loader.py, line 1046: ComponentProtocol, importlib.import_module(self.pkg_path) inside the event loop
Any assistance would be appreciated as to what I am doing wrong
/config/life360/init.py
That's at least one problem. You need to get rid of the old work around. I.e., remove /config/life360 and everything in it. Then restart HA.
LOL... thank you so much for pointing me in the right direction... I never even notices that it was pointing to the main configuration file... I kept reading that as the file in the custom_components folder.
After you pointed that out, I was able to successfully update.
Thank you again