Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't restart after installing Dwains Dashboard #819

Open
remirr opened this issue Jul 1, 2024 · 1 comment
Open

Can't restart after installing Dwains Dashboard #819

remirr opened this issue Jul 1, 2024 · 1 comment

Comments

@remirr
Copy link

remirr commented Jul 1, 2024

I have installed the latest version of Dwains Dashboard but now I can no longer restart HA. When I try to add the integration I get an error saying: Config flow could not be loaded: {"message":"Invalid handler specified"}

When I try to restart I get
`Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/dwains_dashboard/process_yaml.py:46
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 9:11:09 PM (3 occurrences)
Last logged: 9:11:24 PM

[547297420608] module 'homeassistant.util.yaml.loader' has no attribute 'PythonSafeLoader'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 227, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1969, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2006, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 980, in admin_handler
await result
File "/usr/src/homeassistant/homeassistant/components/homeassistant/init.py", line 167, in async_handle_core_service
errors = await conf_util.async_check_ha_config_file(hass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config.py", line 973, in async_check_ha_config_file
res = await check_config.async_check_ha_config_file(hass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 97, in async_check_ha_config_file
config = await hass.async_add_executor_job(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config.py", line 414, in load_yaml_config_file
conf_dict = load_yaml(config_path, secrets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 163, in load_yaml
return parse_yaml(conf_file, secrets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 176, in parse_yaml
return _parse_yaml(SafeLoader, content, secrets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 206, in _parse_yaml
yaml.load(content, Loader=lambda stream: loader(stream, secrets))
File "/usr/local/lib/python3.11/site-packages/yaml/init.py", line 81, in load
return loader.get_single_data()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 51, in get_single_data
return self.construct_document(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 55, in construct_document
data = self.construct_object(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 337, in _handle_mapping_tag
nodes = loader.construct_pairs(node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 155, in construct_pairs
value = self.construct_object(value_node, deep=deep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 100, in construct_object
data = constructor(self, node)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 256, in _include_yaml
return _add_reference(load_yaml(fname, loader.secrets), loader, node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dwains_dashboard/process_yaml.py", line 46, in load_yamll
return loader.yaml.load(config_file, Loader=lambda stream: loader.SafeLineLoader(stream, secrets)) or OrderedDict()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yaml/init.py", line 79, in load
loader = Loader(stream)
^^^^^^^^^^^^^^
File "/config/custom_components/dwains_dashboard/process_yaml.py", line 46, in
return loader.yaml.load(config_file, Loader=lambda stream: loader.SafeLineLoader(stream, secrets)) or OrderedDict()
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'homeassistant.util.yaml.loader' has no attribute 'PythonSafeLoader'
`

@remirr remirr closed this as completed Jul 1, 2024
@remirr remirr reopened this Jul 1, 2024
@remirr
Copy link
Author

remirr commented Jul 1, 2024

Downgraded to 3.6.0, that worked. Then upgraded to 3.7.1 and it stopped working again.

Logger: homeassistant.setup
Source: loader.py:826
First occurred: 9:18:35 PM (1 occurrences)
Last logged: 9:18:35 PM

Setup failed for custom integration dwains_dashboard: Unable to import component: Exception importing custom_components.dwains_dashboard
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 818, in get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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/dwains_dashboard/init.py", line 10, in
from .process_yaml import process_yaml, reload_configuration
File "/config/custom_components/dwains_dashboard/process_yaml.py", line 69, in
loader.PythonSafeLoader.add_constructor("!include", _include_yaml)
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'homeassistant.util.yaml.loader' has no attribute 'PythonSafeLoader'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 215, in _async_setup_component
component = integration.get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 826, in get_component
raise ImportError(f"Exception importing {self.pkg_path}") from err
ImportError: Exception importing custom_components.dwains_dashboard

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

No branches or pull requests

1 participant