[SOLVED] Weird problem: certain intents cause multiple intents to be performed

I’m having a weird problem with a skill I’m developing, and I’m hoping someone a bit more experienced could take a look at it.

The problem is that when certain intents are called, Mycroft then performs multiple intents in the skill in rapid succession. As far as I can tell I’m not registering or defining those intents any differently than the ones that are working, so I have no idea what’s causing the problem.

Here’s my github repo: https://github.com/who-is-matt/kodi-controller-skill.git

Everything works fine until the osd_intent. But if the osd_intent, back_intent, select_intent, home_intent, info_intent, context_intent, scanvideo_intent, or scanaudio_intent are called, Mycroft performs all of the intents that I just listed, as shown here:

03:22:20.453 - main:handle_utterance:62 - INFO - Utterance: [u’kodi select’]
03:22:20.579 - kodi-controller-skill__init__:handle_osd_intent:181 - INFO - Kodi response: {u’jsonrpc’: u’2.0’, u’id’: u’b651871fcc2c41aea32b614a634929f0’, u’result’: u’OK’}
03:22:21.259 - kodi-controller-skill__init__:handle_back_intent:210 - INFO - Kodi response: {u’jsonrpc’: u’2.0’, u’id’: u’5f517851665447f49b2bbae77192b4fb’, u’result’: u’OK’}
03:22:22.104 - kodi-controller-skill__init__:handle_select_intent:216 - INFO - Kodi response: {u’jsonrpc’: u’2.0’, u’id’: u’e9ebc459bc4a4ecbbe26e938725ad752’, u’result’: u’OK’}
03:22:23.056 - kodi-controller-skill__init__:handle_home_intent:222 - INFO - Kodi response: {u’jsonrpc’: u’2.0’, u’id’: u’a40c3871f4234db8bf6fdd1a1c41fc5b’, u’result’: u’OK’}
03:22:23.954 - kodi-controller-skill__init__:handle_info_intent:228 - INFO - Kodi response: {u’jsonrpc’: u’2.0’, u’id’: u’4b9dbe77a61b4c6a9711d6e41c1871ec’, u’result’: u’OK’}
03:22:25.038 - kodi-controller-skill__init__:handle_context_intent:234 - INFO - Kodi response: {u’jsonrpc’: u’2.0’, u’id’: u’a1540099752746eda2e19989b9170472’, u’result’: u’OK’}
03:22:25.941 - kodi-controller-skill__init__:handle_scanvideo_intent:242 - INFO - Kodi response: {u’jsonrpc’: u’2.0’, u’id’: u’38308cb2c14744399cedf88e17014a44’, u’result’: u’OK’}
03:22:26.953 - kodi-controller-skill__init__:handle_scanaudio_intent:248 - INFO - Kodi response: {u’jsonrpc’: u’2.0’, u’id’: u’33fcbc7e23fd49d99a16198ba518d997’, u’result’: u’OK’}

Note that in this example I called the select_intent, which is in the middle of the pack, and the direction_intent wasn’t called even though it’s also in the middle of the affected intents. I’ve tried everything I can think of, including shuffling the order of the intents and commenting them out one by one. Nothing’s had any affect. No matter what I do, any of the affected intents result in all of the other affected intents being called, regardless of where they appear in the code.

(And yes, my skill is another Kodi controller skill. I realize that there are already three of them in the skills repository, but none of them seem to be in active development, none have the features or flexibility I’d like to have, and after looking over each of them I realized it would be easier to start fresh than modify any of them to do what I want them to do.)

Except for this issue all of the basic functionality is working, so I’d like to figure this out so I can move on to the more advanced features (and start contributing to some other skills). I’d appreciate any help, because this has me completely stumped.

I haven’t looked too far into it, but I noticed the last six or so intents on the __init__.py on GitHub had the same intent name in the parentheses. I would recommend changing them to see if that fixes the problem.

1 Like

And this is why programmers are all a bit nuts. I’ve been staring at this code for hours and hadn’t noticed that. Thanks!

1 Like