MycroftAI / mycroft-dinkum

A consumer ready version of Mycroft specifically for the Mark II.
Apache License 2.0
19 stars 8 forks source link

Error when Porting Classic Skill to Mycroft 2 #49

Closed jmillerv closed 1 year ago

jmillerv commented 1 year ago

Describe the bug While following the Porting Hello World instructions, I've been unable to restart the skills service.

sudo systemctl restart dinkum-skills.service returns with

Job for dinkum-skills.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status dinkum-skills.service" and "journalctl -xe" for details.

To Reproduce Steps to reproduce the behavior:

  1. Follow the instructions linked in the bug description until you get to step 5.
  2. Perform step 5
  3. wait for it to error it out

Expected behavior I expected the services to restart without issue and to be able to use the ported hello world skill.

Log files /var/log/mycroft/ not found

from journalctl-xe

Dec 25 06:03:34 localhost.localdomain python[20313]: Traceback (most recent call last):
Dec 25 06:03:34 localhost.localdomain python[20313]:   File "/opt/mycroft-dinkum/services/messagebus/service/event_handler.py", line 52, in on_message
Dec 25 06:03:34 localhost.localdomain python[20313]:     client.write_message(message)
Dec 25 06:03:34 localhost.localdomain python[20313]:   File "/opt/mycroft-dinkum/.venv/lib/python3.8/site-packages/tornado/websocket.py", line 337, in write_message
Dec 25 06:03:34 localhost.localdomain python[20313]:     raise WebSocketClosedError()
Dec 25 06:03:34 localhost.localdomain python[20313]: tornado.websocket.WebSocketClosedError

Environment (please complete the following information):

Additional context Modified the files as requested in the documentation.

jmillerv commented 1 year ago

An interesting development. The skill does appear to work. I tried "Hey Mycroft, how are you?"

It responded with "I need to look that up" > checking answers screen > "I am doing well, thank you."

So, the port seems to have worked but there are errors when restarting the service.

EDIT: What's weird is that "how are you?" works at all. To avoid getting the restart error, I removed --skill /opt/mycroft-dinkum/skills/hello.mark2 from the /etc/systemd/system/dinkum-skills.service file.

jmillerv commented 1 year ago

After some investigation and a friendly interaction on the forums I was able to get the skills working.

Basically, the solution to this error is properly setup your Python dev environment and lint the files you're changing on the mycroft.