Wrong skill triggered by intent

I am currently making a sleep tracker skill using the template generated by msk. For some reason, after making some functionality changes, the intent “Start the sleep tracker” loaded the Spotify skill instead of the actual sleep-tracker skill.
Other intents failed with the fallback “sorry, I do not understand.”
I wonder if there is a bug in Padatious or something.

Same thing happens even via CLI.
The skill has been updated a lot of times but the same thing happens.

„Start“ is one of the keywords that triggers the Common Play Framework. This explains why the Spotify skill is loaded


Already re-worded the intent to avoid triggering the Common Play Framework but for some reason Mycroft still says “sorry, I didn’t catch that” despite the words (spoken via mic or typed via cli) match exactly the required intent phrase.

yeah, I’m getting this too, but with my email skill. It’s all loaded, but it won’t respond to my queries…

Hey @rekkitcwts, can you confirm if the Skill has successfully loaded?
An easy way is from the CLI type :skills this gives you a list of loaded Skills, and any in red have had some kind of fatal error.

I just did a quick install from the master branch and got:

01:05:45.557 - mycroft.skills.core:load_skill:170 - ERROR - Failed to load skill: sleep-tracker-skill.rekkitcwts
Traceback (most recent call last):
  File "/opt/venvs/mycroft-core/lib/python3.4/site-packages/mycroft/skills/core.py", line 136, in load_skill
    skill = skill_module.create_skill()
  File "/opt/mycroft/skills/sleep-tracker-skill.rekkitcwts/__init__.py", line 230, in create_skill
    return SleepTracker()
  File "/opt/mycroft/skills/sleep-tracker-skill.rekkitcwts/__init__.py", line 144, in __init__
    self.birthdate = datetime(year = int(birth_year), month = int(birth_month), day = int(birth_day))
ValueError: invalid literal for int() with base 10: ''

So assuming that is caused by not having settings on first load, after adding settings and touching __init__.py to reload the skill it loaded fine but still wouldn’t respond to “track my sleep”.

Having a look at your vocab I saw there were extra spaces that might cause issues eg
(Track | Monitor) my sleep
The capitalisation shouldn’t matter (I think), but the spaces around the the pipe character would be interpreted so the exact match would be either:

  • Track [two spaces] my sleep
  • [space]Monitor my sleep

After triggering the Skill with one of these then “track my sleep” worked.

I’d try changing this vocab to just
(track|monitor) my sleep

The skill not detected issue is already fixed.

Also have you saved a date of birth on the skill settings page?

Yeah the Skill was detected fine. The trouble is when you first install the Skill it pulls down the settings which are not yet set. Eg this line can only successfully run after settings have been entered and fetched:
self.birthdate = datetime(year = int(birth_year), month = int(birth_month), day = int(birth_day))

As these setting variables aren’t yet set, this results in the error above and so Mycroft doesn’t believe the skill is working. Once it crashes it won’t let the Skill continue to operate. So after you add the settings a user would need to either restart Mycroft or tell it to reload the skill by modifying one of the files.

To get around this we generally need to set default values, or add a test for if the settings are blank and only proceed when valid values are available.