Closed Nunak closed 1 year ago
TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'NoneType'
This sounds like python version problem, could you check what version are you using? What HomeAssistant installation method have you used?
NameError: name 'OptionsFlowHandler' is not defined
This is strange, that class is defined few lines below this problem. could you please make sure that all the files were correctly copied into HomeAssistant folder?
I did install via HACS.
version:
{
"domain": "cz_energy_spot_prices",
"name": "Czech Energy Spot Prices",
"documentation": "https://github.com/rnovacek/homeassistant_cz_energy_spot_prices",
"dependencies": [],
"codeowners": ["@rnovacek"],
"requirements": [],
"iot_class": "cloud_polling",
"version": "0.1.0",
"config_flow": true
}
Let me try manual install via git
I did manual install via git clone(old one has been deleted) and same issue :(
2022-12-05 17:52:22.120 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.cz_energy_spot_prices.config_flow
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 728, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/loader.py", line 745, 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 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/homeassistant/.homeassistant/custom_components/cz_energy_spot_prices/config_flow.py", line 59, in <module>
class OptionsFlowHandler(config_entries.OptionsFlow):
File "/home/homeassistant/.homeassistant/custom_components/cz_energy_spot_prices/config_flow.py", line 65, in OptionsFlowHandler
self, user_input: dict[str, Any] | None = None
TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'NoneType'
2022-12-05 17:52:22.122 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration cz_energy_spot_prices: Exception importing custom_components.cz_energy_spot_prices.config_flow
Please try pulling from git again, I've tried to fix it. Not quite certain it'll help.
It's working! Many thanks :)
Cool, thanks for reporting!
Hi,
many thanks for this integration!
some day ago this integration did stop working