I created a simple notification skill following the guidelines here. Below is my source code:
from mycroft import MycroftSkill
class WakeWordDetector(MycroftSkill):
def __init__(self):
MycroftSkill.__init__(self)
self.add_event('recognizer_loop:wakeword', self.handle_recognizer_wakeword)
def handle_recognizer_wakeword(self):
self.log.info('Wake word detected!')
def create_skill():
return WakeWordDetector()
When I load this skill, the error below is produced.
Traceback (most recent call last):
File “/home/pi/Project/mycroft-core/mycroft/skills/skill_loader.py”, line 292, in _create_skill_instance
self.instance = skill_module.create_skill()
File “/opt/mycroft/skills/wake-word-detector-skill/init.py”, line 62, in create_skill
return WakeWordDetector()
File “/opt/mycroft/skills/wake-word-detector-skill/init.py”, line 8, in init
self.add_event(‘recognizer_loop:wakeword’, self.handle_recognizer_wakeword)
File “/home/pi/Project/mycroft-core/mycroft/skills/mycroft_skill/mycroft_skill.py”, line 946, in add_event
return self.events.add(name, wrapper, once)
File “/home/pi/Project/mycroft-core/mycroft/skills/mycroft_skill/event_container.py”, line 150, in add
self.bus.on(name, handler)
AttributeError: ‘NoneType’ object has no attribute ‘on’
It seems like it is having difficulty resolveing self.bus
.
Does anyone know what the issue is? Thanks in advance!