Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Errors when importing GB Data from my utility #84

Open
yanky79 opened this issue Oct 4, 2023 · 0 comments
Open

Errors when importing GB Data from my utility #84

yanky79 opened this issue Oct 4, 2023 · 0 comments

Comments

@yanky79
Copy link

yanky79 commented Oct 4, 2023

Home Assistant Core
Unable to prepare setup for platform green_button.number: Platform not found (Exception importing custom_components.green_button.number).
11:16:32 PM – (ERROR) setup.py
Unexpected exception importing platform custom_components.green_button.number
11:16:32 PM – (ERROR) Green Button (custom integration)

Configuration

I was able to get the Green Button Integration installed via HACS. Restarted HA as required and when I attempted to run the configuration, I ran an export from my Utility provider (Arizona Public Service (APS)) to get the XML. I copied and pasted the XML.

The config loaded successfully, but once the code started running against the XML, the above errors were generated.

I am happy to share my XML if that would help with troubleshooting

2023-10-03 23:16:32.072 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.green_button.number
2023-10-03 23:16:32.080 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform green_button.number: Platform not found (Exception importing custom_components.green_button.number).

Debug logs

Logger: homeassistant.setup
Source: setup.py:379
First occurred: 11:16:32 PM (1 occurrences)
Last logged: 11:16:32 PM

Unable to prepare setup for platform green_button.number: Platform not found (Exception importing custom_components.green_button.number).

This error originated from a custom integration.

Logger: homeassistant.loader
Source: custom_components/green_button/statistics.py:549
Integration: Green Button (documentation, issues)
First occurred: 11:16:32 PM (1 occurrences)
Last logged: 11:16:32 PM

Unexpected exception importing platform custom_components.green_button.number
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 838, in get_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 855, 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 "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/config/custom_components/green_button/number.py", line 24, in
from . import statistics
File "/config/custom_components/green_button/statistics.py", line 549, in
@dataclasses.dataclass(frozen=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dataclasses.py", line 1220, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dataclasses.py", line 993, in _process_class
raise TypeError('cannot inherit frozen dataclass from a '
TypeError: cannot inherit frozen dataclass from a non-frozen one

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant