MycroftAI / skill-homeassistant

Mycroft Skill/Integration for Homeassistant
GNU Lesser General Public License v3.0
114 stars 62 forks source link

Error Message #70

Closed Y0ngg4n closed 3 years ago

Y0ngg4n commented 3 years ago

Describe the bug Throws an error

Log files

20:27:03.169 | INFO     |  5168 | __main__:handle_wakeword:71 | Wakeword Detected: hey mycroft
 20:27:03.643 | INFO     |  5168 | __main__:handle_record_begin:41 | Begin Recording...
 20:27:05.704 | INFO     |  5168 | __main__:handle_record_end:49 | End Recording...
 20:27:07.492 | INFO     |  5168 | __main__:handle_utterance:76 | Utterance: ['schalte wohnzimmer aus']
 20:27:07.600 | ERROR    |  4550 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:897 | Bei der Verarbeitung der Anfrage ist ein Fehler im Skill Home Assistant Skill aufgetreten.
Traceback (most recent call last):
  File "/home/pi/mycroft-core/mycroft/skills/mycroft_skill/event_container.py", line 73, in wrapper
    handler(message)
  File "/opt/mycroft/skills/skill-homeassistant.mycroftai/__init__.py", line 174, in handle_turn_off_intent
    self._handle_turn_actions(message)
  File "/opt/mycroft/skills/skill-homeassistant.mycroftai/__init__.py", line 305, in _handle_turn_actions
    data=ha_entity)
  File "/home/pi/mycroft-core/mycroft/skills/mycroft_skill/mycroft_skill.py", line 1202, in speak_dialog
    self.dialog_renderer.render(key, data),
  File "/home/pi/mycroft-core/mycroft/dialog/dialog.py", line 110, in render
    line = line.format(**context)
ValueError: Single '}' encountered in format string
  ^--- NEWEST ---^ 

Environment (please complete the following information):

Tony763 commented 3 years ago

Hi @Y0ngg4n, i see it. In skill-homeassistant/dialog/de-de/homeassistant.device.off.dialog in second entry is unbalanced double bracket. All files should have only one pair and in past there was one or two PR's to fix it but unfortunately were rewrote by translations and other PR's. I will send a new PR to fix this in about a hour.

Tony763 commented 3 years ago

Hi @Y0ngg4n, could you test the PR by running mycroft-msm install -b issue70 https://github.com/Tony763/mycroft-homeassistant. It will install skill from my PR. If its ok, you can return back to master by running mycroft-msm install https://github.com/MycroftAI/skill-homeassistant or you can wait till PR is merged.

Y0ngg4n commented 3 years ago

@Tony763 sorry cant reproduce the error again. seems fixed.

Tony763 commented 3 years ago

@Y0ngg4n in my repo or in original skill? Can you try it more times as affected dialog file contains 3 utterances that are picked randomly and second utterance is broken.

Y0ngg4n commented 3 years ago

@Tony763 in your repo. i tried it 9 times so should be fine i think 🤔

Tony763 commented 3 years ago

@Y0ngg4n then it's okay :grin: Thanks for testing, now we just have to wait for check and approve by @krisgesling.

Tony763 commented 3 years ago

@Y0ngg4n Hi, PR is merged. You can switch back to mycroft repo. Also close this issue, please.