Hi,
I’m adapting my prior custom Mycroft skills to work with OVOS. I’m using projen to convert the old skill with the --retrofit
flag. Here’s my current init.py, which still has a few errors after adapting some lines to OVOS:
skills - ovos_workshop.skill_launcher:_load_skill_source:422 - ERROR - Failed to load skill: open-spirits-arise-equalizer-skill.openvoiceos (No module named 'ovos_utils.intents')
File "/home/pi/.local/share/mycroft/skills/open-spirits-arise-equalizer-skill.openvoiceos/__init__.py", line 4, in <module>
skills - ovos_core.skill_manager:_load_skill:576 - ERROR - Failed to load old sty
Any suggestions for what could still be wrong?
Also, when I create new skills in the future with OVOS, I’m wondering what the proper process is for that (mainly for my own skills). Do I create an empty directory in the skills folder and running the following command: npx projen new ovosskill --from "@mikejgray/ovos-skill-projen@latest"
? Will I then have an __init__.py
that I can modify, much like what I used to do in Mycroft? Or are there more steps I should officially be doing?
I’m primarily looking for help on the above error, but I still appreciate insights if any on skill creation to make sure I’m doing that properly. Thanks.
Hi there, you found a bug I need to fix in the projen skill generator. If you wouldn’t mind opening an issue that would be great, otherwise I’ll try to remember.
In the meantime, if you’re feeling adventurous, I created something for new skills here: GitHub - OscillateLabsLLC/ovos-cookiecutter-template-skill: A cookiecutter template for generating new OVOS/Neon skills
It’s more lightweight than projen but not as powerful.
1 Like
I continue to appreciate your help as I get my custom voice assistant working again! Unfortunately, after applying those suggested fixes on GitHub, I continue to run into the same .intents
ModuleNotFound error:
2025-03-08 14:06:50.726 - skills - ovos_workshop.skill_launcher:load:278 - INFO - ATTEMPTING TO LOAD SKILL: open-spirits-arise-equalizer-skill.openvoiceos
2025-03-08 14:06:50.740 - skills - ovos_workshop.skill_launcher:_load_skill_source:422 - ERROR - Failed to load skill: open-spirits-arise-equalizer-skill.openvoiceos (No module named 'ovos_utils.intents')
Traceback (most recent call last):
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 420, in _load_skill_source
skill_module = load_skill_module(main_file_path, self.skill_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 78, in load_skill_module
spec.loader.exec_module(mod)
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/pi/.local/share/mycroft/skills/open-spirits-arise-equalizer-skill.openvoiceos/__init__.py", line 4, in <module>
from ovos_utils.intents import IntentBuilder
ModuleNotFoundError: No module named 'ovos_utils.intents'
2025-03-08 14:06:50.746 - skills - ovos_workshop.skill_launcher:_create_skill_instance:469 - WARNING - Legacy skill: 'NoneType' object is not callable
2025-03-08 14:06:50.748 - skills - ovos_core.skill_manager:_load_skill:569 - ERROR - Load of skill /home/pi/.local/share/mycroft/skills/open-spirits-arise-equalizer-skill.openvoiceos failed!
Traceback (most recent call last):
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 465, in _create_skill_instance
self.instance = skill_creator(bus=self.bus,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_core/skill_manager.py", line 567, in _load_skill
load_status = skill_loader.load()
^^^^^^^^^^^^^^^^^^^
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 279, in load
return self._load()
^^^^^^^^^^^^
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 361, in _load
self.loaded = self._create_skill_instance()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 470, in _create_skill_instance
self.instance = skill_creator()
^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable
2025-03-08 14:06:50.752 - skills - ovos_core.skill_manager:_load_skill:576 - ERROR - Failed to load old style skill: /home/pi/.local/share/mycroft/skills/open-spirits-arise-equalizer-skill.openvoiceos
Suggestions on that one? I think this pertains to a particular import.
Hey zinsy,
I cloned your repo and applied some of the suggestions, but there are a few other changes needed before this will load:
- If you look at
setup.py
there are some TODO items that need to be completed or it won’t install as a Python package
- You’re getting that traceback because ovos-utils moved
IntentBuilder
around version 0.1.0, but it doesn’t look like you’re using IntentBuilder
at all so you can just delete it
- Several of your requirements are part of the Python standard library, so including them in requirements.txt causes your package to fail to install. Also, manifest.yml is not required, and should be deleted since it’s specifying Python standard library packages
- Not related to failing to load, but there’s no need to instantiate a
MycroftBusClient
because it’s exposed as self.bus
natively
- Also not related to failing to load, but in a class you can make all globals self.variables instead
I submitted a PR with some changes for you: fix: get skill to load as a Python package by mikejgray · Pull Request #1 · zinsy23/open-spirits-arise-equalizer-skill.openvoiceos · GitHub
1 Like
Thanks for taking the time to review and suggest these changes! Unfortunately, I still get the following error:
2025-03-11 14:46:24.984 - skills - ovos_workshop.skill_launcher:load:278 - INFO - ATTEMPTING TO LOAD SKILL: open-spirits-arise-equalizer-skill
2025-03-11 14:46:24.997 - skills - ovos_workshop.skill_launcher:_load_skill_source:422 - ERROR - Failed to load skill: open-spirits-arise-equalizer-skill (name 'intent_file_handler' is not defined)
Traceback (most recent call last):
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 420, in _load_skill_source
skill_module = load_skill_module(main_file_path, self.skill_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 78, in load_skill_module
spec.loader.exec_module(mod)
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/pi/.local/share/mycroft/skills/open-spirits-arise-equalizer-skill/__init__.py", line 73, in <module>
class OpenSpiritsAriseEqualizer(OVOSSkill):
File "/home/pi/.local/share/mycroft/skills/open-spirits-arise-equalizer-skill/__init__.py", line 83, in OpenSpiritsAriseEqualizer
@intent_file_handler('equalizer.arise.spirits.open.intent')
^^^^^^^^^^^^^^^^^^^
NameError: name 'intent_file_handler' is not defined
2025-03-11 14:46:25.003 - skills - ovos_workshop.skill_launcher:_create_skill_instance:469 - WARNING - Legacy skill: 'NoneType' object is not callable
2025-03-11 14:46:25.006 - skills - ovos_core.skill_manager:_load_skill:569 - ERROR - Load of skill /home/pi/.local/share/mycroft/skills/open-spirits-arise-equalizer-skill failed!
Traceback (most recent call last):
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 465, in _create_skill_instance
self.instance = skill_creator(bus=self.bus,
^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_core/skill_manager.py", line 567, in _load_skill
load_status = skill_loader.load()
^^^^^^^^^^^^^^^^^^^
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 279, in load
return self._load()
^^^^^^^^^^^^
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 361, in _load
self.loaded = self._create_skill_instance()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skill_launcher.py", line 470, in _create_skill_instance
self.instance = skill_creator()
^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable
2025-03-11 14:46:25.010 - skills - ovos_core.skill_manager:_load_skill:576 - ERROR - Failed to load old style skill: /home/pi/.local/share/mycroft/skills/open-spirits-arise-equalizer-skill
I believe it has to do with the following line for handling intents:
@intent_file_handler('equalizer.arise.spirits.open.intent')
Also, that self.bus
error toward the middle of the output, did I initialize the bus correctly? Are those the things needed to be changed, or does the debug output indicate anything else too?
Hmm, thought I got all of those. If you change it to intent_handler
then it should load. I was able to load it in my test setup with the PR
1 Like
You’re right! I missed it on my copy. It loads successfully now after doing intent_handler! Thanks for your help in getting OVOS working!
1 Like