Can mycroft_routine_skill be used with current version?

I’ve been trying to figure out how to do exactly what this skill seems to do; somebody on Facebook pointed me to it. I installed it, but it shows up red in the skills list and doesn’t seem to be working. It looks like there have been some changes in the Mycroft structure since it was released; I don’t know if that’s the problem or if I’m doing something wrong. I’m also curious why this skill or an updated version of it isn’t in the marketplace.

-Bill

Hello,

I’m the author of the routine skill. I haven’t used Mycroft in a while, because I moved and don’t currently have internet. It’s definitely possible they have made changes recently that broke it. I can take a look and see if there are issues with the current version - possibly this weekend (feel free to nudge me if you don’t hear back). If you can provide logs/errors, that might help me debug faster.

As for not being in the marketplace - It used to be, but Mycroft (the company) changed the process/started requiring it to be resubmitted for each version bump. I didn’t feel like taking the effort to keep resubmitting it, especially as my time is limited. If anyone would like to submit it, I’m supportive of the idea/will review and merge any changes necessary. But I don’t intend to tackle that myself, any time soon.

1 Like

Also, if anyone comes across this in the future - feel free to open issues on the repo in GitHub, if there are problems getting the skill to run. I’ll see those faster, as I get notified immediately (vs just periodically getting digest emails from the forum).

1 Like

@Culturedropout, I just pulled down the latest version of Mycroft (running from git) and the routine skill still works for me.

If you’re still having issues, can you provide the logs? If you search the skills log (should be /var/log/mycroft/skills.log), for mycroft_routine_skill, there should be messages there if it’s failing to load - you can just send that section.

Well, I got this once, but mostly…

    021-08-13 00:39:27.734 | ERROR    |   712 | SkillInstallerSkill | MSM failed: SkillNotFound(mycroft_routine_skill)

2021-08-13 00:39:49.294 | INFO | 712 | msm.mycroft_skills_manager | Best match (0.33): mycroft-reminder by mycroftai
2021-08-13 00:42:06.973 | INFO | 712 | mycroft.skills.skill_loader:load:185 | ATTEMPTING TO LOAD SKILL: mycroft_routine_skill
2021-08-13 00:42:06.988 | ERROR | 712 | mycroft.skills.skill_loader:_load_skill_source:279 | Failed to load skill: mycroft_routine_sk$
Traceback (most recent call last):
File “/home/pi/mycroft-core/mycroft/skills/skill_loader.py”, line 276, in _load_skill_source
skill_module = load_skill_module(main_file_path, self.skill_id)
File “/home/pi/mycroft-core/mycroft/skills/skill_loader.py”, line 72, in load_skill_module
spec.loader.exec_module(mod)
File “”, line 728, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/opt/mycroft/skills/mycroft_routine_skill/init.py”, line 2, in
from apscheduler.schedulers.background import BackgroundScheduler
ModuleNotFoundError: No module named ‘apscheduler’
2021-08-13 00:42:06.992 | ERROR | 712 | mycroft.skills.skill_loader:_communicate_load_status:351 | Skill mycroft_routine_skill failed$
2021-08-13 00:49:01.231 | INFO | 712 | QuestionsAnswersSkill | Searching for describe routine morning


…its been just days and days of this, which doesn’t look like anything is wrong:

2021-08-27 01:48:32.028 | INFO | 709 | msm.skill_entry | Nothing new for mycroft-pairing
2021-08-27 01:48:32.985 | INFO | 709 | msm.skill_entry | Nothing new for mycroft_routine_skill
2021-08-27 01:48:33.292 | INFO | 709 | msm.skill_entry | Nothing new for mycroft-configuration
2021-08-27 01:48:34.077 | INFO | 709 | msm.skill_entry | Nothing new for learning

But the routine skill is displayed in red on the cli log, meaning, I think, that it didn’t load or wasn’t recognized? Any ideas? Thanks for looking at this, by the way. Above and beyond, in my opinion! :slight_smile:

-Bill

Ok - I see now that “routine” is no longer red. I wonder what happened…? Let me try it again and get back to you. Thanks!

ModuleNotFoundError: No module named ‘apscheduler’

It looks like the dependencies did not get installed. I think this should happen automatically if you installed via MSM, but if you cloned the git repo yourself, you’d need to manually install them (see the last step of GitHub - ChristopherRogers1991/mycroft_routine_skill: Create, run, and schedule routines with Mycroft).

Regardless of how you attempted to install it in the first place, what you’ll need to do is run pip install -r requirements.txt from within the skill’s directory, using the installation of python that mycroft runs with. So, something like:

cd /opt/mycroft/skills/mycroft_routine_skill  # The skill directory might be prefixed with my github username
source <mycroft-core-root>/.venv/bin/activate  # This is only necessary if running from git - if you're on a mark 1, picroft, or similar, you shouldn't need this
pip install -r requirements.txt
(.venv) pi@picroft:/opt/mycroft/skills/mycroft_routine_skill $ pip install -r requirements.txt
Requirement already satisfied: apscheduler in /home/pi/mycroft-core/.venv/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (3.7.0)
Requirement already satisfied: pytz in /home/pi/mycroft-core/.venv/lib/python3.7/site-packages (from apscheduler->-r requirements.txt (line 1)) (2017.2)
Requirement already satisfied: six>=1.4.0 in /home/pi/mycroft-core/.venv/lib/python3.7/site-packages (from apscheduler->-r requirements.txt (line 1)) (1.13.0)
Requirement already satisfied: setuptools>=0.7 in /home/pi/mycroft-core/.venv/lib/python3.7/site-packages (from apscheduler->-r requirements.txt (line 1)) (41.4.0)
Requirement already satisfied: tzlocal~=2.0 in /home/pi/mycroft-core/.venv/lib/python3.7/site-packages (from apscheduler->-r requirements.txt (line 1)) (2.1)
WARNING: You are using pip version 20.0.2; however, version 21.2.4 is available.
You should consider upgrading via the '/home/pi/mycroft-core/.venv/bin/python -m pip install --upgrade pip' command.
(.venv) pi@picroft:/opt/mycroft/skills/mycroft_routine_skill $ 

I honestly don’t remember how I got it, but it seems to think apscheduler is already there. That was a couple of weeks ago in the log, so maybe something else corrected it…?

You might try stopping Mycroft (ensure the process stopped, via ps -ef | grep mycroft ), then remove the skills log, and restart Mycroft. That would give you a clean log, so any error you find would be relevant only to the latest run.

Related, have Mycroft logs been synced up with logrotate?

-Mike M

As a somebody new to mycroft, which directories do i install skills in? I am runnin ubuntu and do not see /opt under mycroft-core

/opt/mycroft/skills

I have these three settings in my .bashrc files for quick access to log files and skills, and to have the Mycroft exectuables in my PATH

export LOG="/var/log/mycroft"
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/games:/home/pi/mycroft-core/bin"
export SKI="/opt/mycroft/skills"
-Mike M

Please take a look here. Here is my current issue after install

ERROR    | 23789 | mycroft.skills.settings:_issue_api_call:306 | Failed to upload skill settings meta for ...

This is occuring in debug for nearly eve skill and I only have tried to install the routine

What commands did you use to install the skills and what was the output?

i tried both msm and git clone GitHub - ChristopherRogers1991/mycroft_routine_skill: Create, run, and schedule routines with Mycroft

to do it manually under pretty much all the skill files, I deleted the ones copies not under /opt
Ive since lost the output but it was successful, although i did so under user not .venv

Officially supported skills do the same error

sean@ubtu:/opt/mycroft/skills$ git clone https://github.com/ChristopherRogers1991/mycroft_routine_skill.git
Cloning into 'mycroft_routine_skill'...
remote: Enumerating objects: 323, done.
remote: Counting objects: 100% (197/197), done.
remote: Compressing objects: 100% (97/97), done.
remote: Total 323 (delta 114), reused 171 (delta 94), pack-reused 126
Receiving objects: 100% (323/323), 82.55 KiB | 1.76 MiB/s, done.
Resolving deltas: 100% (138/138), done.
sean@ubtu:/opt/mycroft/skills$ cd mycroft_routine_skill
sean@ubtu:/opt/mycroft/skills/mycroft_routine_skill$ source <mycroft-core>/.venv/bin/activate
bash: mycroft-core: No such file or directory
sean@ubtu:/opt/mycroft/skills/mycroft_routine_skill$ source ~/mycroft-core/.venv/bin/activate
(.venv) sean@ubtu:/opt/mycroft/skills/mycroft_routine_skill$ 
(.venv) sean@ubtu:/opt/mycroft/skills/mycroft_routine_skill$     pip install -r requirements.txt
Collecting apscheduler
  Using cached APScheduler-3.8.1-py2.py3-none-any.whl (59 kB)
Requirement already satisfied: setuptools>=0.7 in /home/sean/mycroft-core/.venv/lib/python3.8/site-packages (from apscheduler->-r requirements.txt (line 1)) (59.3.0)
Requirement already satisfied: six>=1.4.0 in /home/sean/mycroft-core/.venv/lib/python3.8/site-packages (from apscheduler->-r requirements.txt (line 1)) (1.16.0)
Requirement already satisfied: pytz in /home/sean/mycroft-core/.venv/lib/python3.8/site-packages (from apscheduler->-r requirements.txt (line 1)) (2017.2)
Collecting tzlocal!=3.*,>=2.0
  Using cached tzlocal-4.1-py3-none-any.whl (19 kB)
Collecting pytz-deprecation-shim
  Using cached pytz_deprecation_shim-0.1.0.post0-py2.py3-none-any.whl (15 kB)
Collecting backports.zoneinfo; python_version < "3.9"
  Using cached backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_x86_64.whl (74 kB)
Collecting tzdata; python_version >= "3.6"
  Using cached tzdata-2021.5-py2.py3-none-any.whl (339 kB)
Installing collected packages: backports.zoneinfo, tzdata, pytz-deprecation-shim, tzlocal, apscheduler
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/home/sean/mycroft-core/.venv/lib/python3.8/site-packages/backports.zoneinfo-0.2.1.dist-info'
Consider using the `--user` option or check the permissions.

WARNING: You are using pip version 20.0.2; however, version 21.3.1 is available.
You should consider upgrading via the '/home/sean/mycroft-core/.venv/bin/python -m pip install --upgrade pip' command.

@S_Murphy ,

The mycroft-msm install is not going to work, because it’s not a supported skill.

Before I tried the git clone, I saved a copy of the current skills and the vocabulary:

pi@ubuntu:~$ lsskills > skills.before
pi@ubuntu:~$ lsvocab > vocab.before

Then I installed the skill as you did:

pi@ubuntu:~$ cd $SKI
pi@ubuntu:/opt/mycroft/skills$ git clone https://github.com/ChristopherRogers1991/mycroft_routine_skill.git
Cloning into 'mycroft_routine_skill'...
...

Then I created a list of skills and vocabularies after the install:

pi@ubuntu:/opt/mycroft/skills$ cd
pi@ubuntu:~$ lsskills > skills.after
pi@ubuntu:~$ lsvocab > vocab.after

There was one skill added as expected:

pi@ubuntu:~$ diff skills.before skills.after
31a32
> mycroft_routine_skill [installed]

But comparing the list of vocabularies before and after is a bit questionable:

pi@ubuntu:~$ diff vocab.before vocab.after
122a123
> beginscheduleshow
159a161,162
> delete
> destroydescribedisableenablelistroutineroutinesrun
165a169
> displaythat's all
202a207
> friday
229a235
> initializemonday
272a279
> new
313a321
> remove
327a336
> saturday
331c340
< searchmore
---
> searchcancelcreate
365a375
> start
371a382
> sunday
394a406,408
> that is all
> that is itmore
> that's it
398a413
> thursday
412a428
> trigger
414a431
> tuesday
430a448
> wednesday

btw, the lsskills and lsvocab commands are small shell scripts available at GitHub - mike99mac/mycroft-tools: line command tools to use with mycroft

Hope this helps.

-Mike M

Is that a standalone pi installation? I was hoping to perfect my install on my ubuntu desktop and transfer the set up to other devices.
This is what shows for debug on every skill

Establishing Mycroft Messagebus connection...
 20:24:32.708 | WARNING  | 23789 | ConfigurationSkill | Failed to update settings, will retry later
 20:24:49.576 | ERROR    | 23789 | mycroft.skills.settings:_issue_api_call:306 | Failed to upload skill settings meta for mycroft-pairing|21.02
Traceback (most recent call last):
  File "/home/sean/mycroft-core/mycroft/skills/settings.py", line 304, in _issue_api_call
    self.api.upload_skill_metadata(self.settings_meta)
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 371, in upload_skill_metadata
    return self.request({
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 64, in request
    return self.send(params)
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 147, in send
    return self.get_response(response, no_refresh)
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 170, in get_response
    raise HTTPError(data, response=response)
requests.exceptions.HTTPError: {'skill_gid': ['Received skill setting definition before manifest for skill mycroft-pairing|21.02']}
 20:24:50.833 | ERROR    | 23789 | mycroft.skills.settings:_issue_api_call:306 | Failed to upload skill settings meta for mycroft-joke|21.02
Traceback (most recent call last):
  File "/home/sean/mycroft-core/mycroft/skills/settings.py", line 304, in _issue_api_call
    self.api.upload_skill_metadata(self.settings_meta)
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 371, in upload_skill_metadata
    return self.request({
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 64, in request
    return self.send(params)
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 147, in send
    return self.get_response(response, no_refresh)
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 170, in get_response
    raise HTTPError(data, response=response)
requests.exceptions.HTTPError: {'skill_gid': ['Received skill setting definition before manifest for skill mycroft-joke|21.02']}
 20:24:50.998 | ERROR    | 23789 | mycroft.skills.settings:_issue_api_call:306 | Failed to upload skill settings meta for fallback-query|21.02
Traceback (most recent call last):
  File "/home/sean/mycroft-core/mycroft/skills/settings.py", line 304, in _issue_api_call
    self.api.upload_skill_metadata(self.settings_meta)
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 371, in upload_skill_metadata
    return self.request({
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 64, in request
    return self.send(params)
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 147, in send
    return self.get_response(response, no_refresh)
  File "/home/sean/mycroft-core/mycroft/api/__init__.py", line 170, in get_response
    raise HTTPError(data, response=response)
requests.exceptions.HTTPError: {'skill_gid': ['Received skill setting definition before manifest for skill fallback-query|21.02']}
 20:24:51.011 | ERROR    | 23789 | mycroft.skills.settings:_issue_api_call:306 | Failed to upload skill settings meta for mycroft-reminder|21.02