cannot import name 'INTEGRATION_METHOD'
See original GitHub issueupdated to todays nightly 2022.4.0.dev20220319 which has some DB updates and attributes changes and Powercalc fails to setup. There was a recorder DB going on also
so maybe that was interfering, but in the end this was raised:
Package package_powercalc setup failed. Component powercalc cannot import name 'INTEGRATION_METHOD' from 'homeassistant.components.integration.sensor' (/usr/src/homeassistant/homeassistant/components/integration/sensor.py) Platform error sensor.powercalc - cannot import name 'INTEGRATION_METHOD' from 'homeassistant.components.integration.sensor' (/usr/src/homeassistant/homeassistant/components/integration/sensor.py)
because of that it can not restart…
Logger: homeassistant.components.hassio
Source: components/hassio/__init__.py:599
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 09:25:27 (1 occurrences)
Last logged: 09:25:27
The system cannot restart because the configuration is not valid: Package package_powercalc setup failed. Component powercalc cannot import name 'INTEGRATION_METHOD' from 'homeassistant.components.integration.sensor' (/usr/src/homeassistant/homeassistant/components/integration/sensor.py) Platform error sensor.powercalc - cannot import name 'INTEGRATION_METHOD' from 'homeassistant.components.integration.sensor'
repeat 77 times
individual error details:
2022-03-19 09:29:56 ERROR (MainThread) [homeassistant.config] Platform error: sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 877, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 588, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 605, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
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 972, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
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/powercalc/__init__.py", line 11, in <module>
from homeassistant.components.integration.sensor import (
ImportError: cannot import name 'INTEGRATION_METHOD' from 'homeassistant.components.integration.sensor' (/usr/src/homeassistant/homeassistant/components/integration/sensor.py)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Cannot import name 'TooManyAttemptsBannedException ...
When try to configure the Overkiz integration by using the link on web site I get an error saying we cannot configure the...
Read more >ImportError: cannot import name '...' from partially initialized ...
This error might happen in case the name of your file is the same as the name of the package you connect. Just...
Read more >Registering system to Red Hat Insights fails with ImportError
Registering system to Red Hat Insights fails with ImportError: cannot import name UnrewindableBodyError ... No translations currently exist. Issue.
Read more >Mercedes Me Component - Custom Integrations
Error occurred loading configuration flow for integration mbapi2020: cannot import name 'US_CUSTOMARY_SYSTEM' from ...
Read more >How to Fix : “ImportError: Cannot import name X” in Python
In Python "ImportError: cannot import name" error generally occurs when the imported class is not accessible, or the imported class is in a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just released v0.19.0-beta.3 which should resolve this issue. Are you able to verify?
perfect. Thanks for testing.