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

Skill crash when speaking an error about HA setup #121

Open
Ramblurr opened this issue Jan 11, 2023 · 1 comment
Open

Skill crash when speaking an error about HA setup #121

Ramblurr opened this issue Jan 11, 2023 · 1 comment

Comments

@Ramblurr
Copy link

This line is missing arguments for the dialog:

self.speak_dialog('homeassistant.error.setup')

==> /var/log/mycroft/skills.log <==
2023-01-11 15:09:55.699 - skills - mycroft.skills.intent_services.commonqa_service:_query_timeout:173 - INFO - Timeout occurred check responses
2023-01-11 15:09:55.924 - skills - mycroft.skills.mycroft_skill.mycroft_skill:_on_event_error:1131 - ERROR - 'field'
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/ovos_utils/messagebus.py", line 352, in wrapper
    handler(message)
  File "/home/mycroft/.local/share/mycroft/skills/skill-homeassistant.mycroftai/__init__.py", line 229, in handle_turn_on_intent
    self._handle_turn_actions(message)
  File "/home/mycroft/.local/share/mycroft/skills/skill-homeassistant.mycroftai/__init__.py", line 382, in _handle_turn_actions
    ha_entity = self._find_entity(
  File "/home/mycroft/.local/share/mycroft/skills/skill-homeassistant.mycroftai/__init__.py", line 155, in _find_entity
    self.speak_dialog('homeassistant.error.setup')
  File "/usr/lib/python3.10/site-packages/mycroft/skills/mycroft_skill/mycroft_skill.py", line 1490, in speak_dialog
    self.dialog_renderer.render(key, data),
  File "/usr/lib/python3.10/site-packages/ovos_utils/dialog.py", line 94, in render
    line = line.format(**context)
KeyError: 'field'

The dialog expects a field argument, but this line does not pass any.

@Tony763
Copy link

Tony763 commented Jan 11, 2023

Hi @Ramblurr, great catch.

Line 155 and 825 should rather use homeassistant.error.offline.dialog as they are after setup stage a rather check if HA instance was initialized/comunicate.

I will check it properly tonight and prepare PR.

@Tony763 Tony763 mentioned this issue Jan 11, 2023
5 tasks
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

2 participants