The Patch Failed: ConfigurationManager

I have a Mark I unit that gives me an error every time it’s restarted and I haven’t been able to nail down how to resolve it. This is what the Mark I says:

“The patch failed because of a AttributeError. type object ‘ConfigurationManager’ has no attribute ‘load_local’”

I don’t have any custom or 3rd party skills installed, but this seems to be happening right after the NPR News skill loads. It would at least make sense to assume that the error is occurring in the Platform Patch skill, and there is a call in there for ConfigurationManager.load_local(). I just don’t know what I should be doing to fix this.

I tried looking this code up on the git repo, but that particular file doesn’t seem to be there. Any help you can give me would be greatly appreciated.

Thanks.

Hi there @linuxrants, sorry to hear this is happening. Are you able to give me some more information on your Mark 1 device and capabilities?

  • What version of Mycroft is it running?
  • Are you comfortable ssh ing into the unit and running some CLI commands?

Best, Kathy

Hi Kathy, thanks for the reply.

Currently Mycroft core is at 0.9.14 and the enclosure version is 1.3.0. I spend my days in an SSH window both personally and professionally, so I would be happy to run some commands if it will help me resolve this issue.

Thanks again, and I look forward to hearing from you.

Mike

Awesomesauce, I saw the handle but didn’t want to assume :smiley:

We’re going to try some apt-get foo first, then take it from there.

  • First, enable ssh to your Mark 1 device if you haven’t already.
  • ssh to the device - pi@your-ip-address, pw is mycroft
  • run sudo apt-get update && apt-get install mycroft-mark-1

There’s doco on the logs at the URL below so it might also be worth tailing them as the system boots to see if that sheds light on anything - I haven’t heard of symptoms like this before.

That did install, which surprised me because I thought everything was up to date. Unfortunately after a reboot I got the same error message. I dug through the mycroft-skills.log file and was able to pull this information out. Please ignore the time stamp as the time seems to be wrong.

07:03:48.668 - PlatformPatchSkill - INFO - Patch failure
07:03:48.740 - mycroft.skills.core:load_skill:157 - INFO - Loaded skill-platform-patch
07:03:48.745 - mycroft.skills.core:load_skill:139 - INFO - ATTEMPTING TO LOAD SKILL: skill-naptime with ID 609713676
07:03:48.869 - SKILLS - DEBUG - {"type": "speak", "data": {"expect_response": false, "utterance": "The patch failed because of a AttributeError. type object 'ConfigurationManager' has no attribute 'load_local'"}, "context": null}
07:03:48.872 - SKILLS - DEBUG - {"type": "mycroft.skills.loaded", "data": {"id": 1493316045, "name": "PlatformPatchSkill"}, "context": null}
07:03:49.092 - mycroft.skills.core:load_skill:157 - INFO - Loaded skill-naptime
07:03:49.097 - SKILLS - DEBUG - {"type": "register_vocab", "data": {"start": "go to sleep", "end": "SleepCommand"}, "context": null}
07:03:49.102 - mycroft.skills.core:load_skill:139 - INFO - ATTEMPTING TO LOAD SKILL: skill-playback-control with ID 1406552044
07:03:49.111 - skill-playback-control - INFO - Playback Control Inited
07:03:49.112 - SKILLS - DEBUG - {"type": "register_vocab", "data": {"start": "nap time", "end": "SleepCommand"}, "context": null}
07:03:49.116 - SKILLS - DEBUG - {"type": "register_vocab", "data": {"start": "sleepy time tea", "end": "SleepCommand"}, "context": null}
07:03:49.119 - SKILLS - DEBUG - {"type": "register_vocab", "data": {"start": "sleepytime tea", "end": "SleepCommand"}, "context": null}
07:03:49.128 - SKILLS - DEBUG - {"type": "register_intent", "data": {"at_least_one": [], "requires": [["SleepCommand", "SleepCommand"]], "optional": [], "name": "609713676:NapTimeIntent"}, "context": null}
07:03:49.138 - SKILLS - DEBUG - {"type": "mycroft.skills.loaded", "data": {"id": 609713676, "name": "NapTimeSkill"}, "context": null}
07:03:49.141 - skill-playback-control - INFO - initializing Playback Control Skill
07:03:49.146 - SKILLS - DEBUG - {"type": "register_vocab", "data": {"start": "next track", "end": "NextKeyword"}, "context": null}
07:03:49.153 - SKILLS - DEBUG - {"type": "register_vocab", "data": {"start": "skip", "end": "NextKeyword"}, "context": null}
07:03:49.157 - mycroft.skills.core:load_skill:157 - INFO - Loaded skill-playback-control
07:03:49.165 - mycroft.skills.core:load_skill:139 - INFO - ATTEMPTING TO LOAD SKILL: skill-media with ID -474202112

It seems like there’s something amiss with the skill-naptime, as that’s the line that comes right before the verbal error message, and the syntax doesn’t look the same as other skill loads.

Mike

Good thinking. Let’s remove skill-naptime to prove that by removing it. We can then reinstall it.

pi@mark_1:~ $ cd /opt/mycroft/skills/
pi@mark_1:/opt/mycroft/skills $ ls -las | grep naptime
4 drwxr-xr-x  6 mycroft mycroft 4096 Jan 28 07:22 skill-naptime
pi@mark_1:/opt/mycroft/skills $ sudo rm -R skill-naptime

Then, reboot and see whether Mycroft Mark 1 loads OK. I so, then we know it’s skill-naptime and we can reinstall it.

pi@mark_1:/opt/mycroft/skills $ msm install skill-naptime
Searching for for 'skill-naptime'...'skill-naptime' skill was not found
msm: error 202
pi@mark_1:/opt/mycroft/skills $ msm install naptime
Searching for for 'naptime'...installing
Installing from: https://github.com/mycroftai/skill-naptime
07:25:08.721 - root - INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
07:25:08.866 - root - INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
07:25:09.677 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /usr/local/lib/python2.7/site-packages/mycroft_core-0.9.14-py2.7.egg/mycroft/configuration/mycroft.conf loaded
07:25:09.685 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /usr/local/lib/python2.7/site-packages/mycroft_core-0.9.14-py2.7.egg/mycroft/configuration/mycroft.conf loaded
07:25:09.690 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
07:25:09.697 - mycroft.configuration.config:load_local:133 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
07:25:09.708 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
07:25:11.620 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device//setting HTTP/1.1" 401 38
07:25:11.634 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
07:25:14.121 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/auth/token HTTP/1.1" 401 38
07:25:14.133 - mycroft.configuration.config:__init__:175 - ERROR - HTTPError fetching remote configuration: 401
07:25:14.137 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /opt/mycroft/web_config_cache.json loaded
07:25:14.141 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
07:25:14.144 - mycroft.configuration.config:load_local:133 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
Cloning into 'skill-naptime'...
remote: Counting objects: 79, done.
remote: Total 79 (delta 0), reused 0 (delta 0), pack-reused 78
Unpacking objects: 100% (79/79), done.
Checking connectivity... done.
Installed: skill-naptime
07:25:18.348 - root - INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
07:25:18.490 - root - INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
07:25:19.302 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /usr/local/lib/python2.7/site-packages/mycroft_core-0.9.14-py2.7.egg/mycroft/configuration/mycroft.conf loaded
07:25:19.309 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /usr/local/lib/python2.7/site-packages/mycroft_core-0.9.14-py2.7.egg/mycroft/configuration/mycroft.conf loaded
07:25:19.314 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
07:25:19.319 - mycroft.configuration.config:load_local:133 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
07:25:19.328 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
07:25:21.101 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device//setting HTTP/1.1" 401 38
07:25:21.115 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
07:25:22.970 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/auth/token HTTP/1.1" 401 38
07:25:22.982 - mycroft.configuration.config:__init__:175 - ERROR - HTTPError fetching remote configuration: 401
07:25:22.987 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /opt/mycroft/web_config_cache.json loaded
07:25:22.990 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
07:25:22.994 - mycroft.configuration.config:load_local:133 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
07:25:23.617 - root - INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
07:25:23.761 - root - INFO - Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
07:25:24.574 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /usr/local/lib/python2.7/site-packages/mycroft_core-0.9.14-py2.7.egg/mycroft/configuration/mycroft.conf loaded
07:25:24.581 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /usr/local/lib/python2.7/site-packages/mycroft_core-0.9.14-py2.7.egg/mycroft/configuration/mycroft.conf loaded
07:25:24.586 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
07:25:24.590 - mycroft.configuration.config:load_local:133 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found
07:25:24.600 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
07:25:26.011 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device//setting HTTP/1.1" 401 38
07:25:26.025 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai
07:25:27.966 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/auth/token HTTP/1.1" 401 38
07:25:27.979 - mycroft.configuration.config:__init__:175 - ERROR - HTTPError fetching remote configuration: 401
07:25:27.983 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /opt/mycroft/web_config_cache.json loaded
07:25:27.987 - mycroft.configuration.config:load_local:128 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
07:25:27.990 - mycroft.configuration.config:load_local:133 - DEBUG - Configuration '/home/pi/.mycroft/mycroft.conf' not found

That was kind of odd. The Mark I loaded up better, but the error is still there. Previously the eyes were yellow and the display wasn’t working. Now I see the time on the front of the device and the eyes are green. I was hopeful we resolved the issue, but it gave me the same error message. It appears that after restarting the unit it reinstalled the naptime skill for me as it was miraculously back in the skills directory when it came back from a reboot. I did remove it and verify that it was gone, so it wasn’t just a bad command or anything like that. So, there goes my theory that it was the naptime skill.

Mike

Thanks @linuxrants for that info.

My gut call here is that this line;
07:03:48.869 - SKILLS - DEBUG - {"type": "speak", "data": {"expect_response": false, "utterance": "The patch failed because of a AttributeError. type object 'ConfigurationManager' has no attribute 'load_local'"}, "context": null}

is the issue.

I’m going to ping my colleagues @forslund an @steve.penrod to see if they have any ideas.

Best, Kathy

Thanks Kathy. I think you’re right. I appreciate your help.

Mike

Anytime, I’m just sorry I couldn’t fix it straight away for you.

1 Like

Hi,

Easiest way to fix this is to remove the platform patch skill. The patch has been installed and some of the changes makes the patch incompatible. See PR here: https://github.com/MycroftAI/skill-platform-patch/pull/4

The PR should fix it as well but as the patch has been applied it’s best to remove it.

Sorry for the inconvenience, this fell between chairs in the pre-christmas rush I think.

/Åke

1 Like

That seems to have resolved the issue that I was having with the patch failed message. Now the eye color on the unit has turned back to yellow and they are unresponsive (for example if I use the nap time command the eyes don’t dim or “close”).

Thank you for your help @forslund.

Mike

Ah, Yellow Eyes. I’ve had this problem too, and we’ve heard a couple of other reports, but we don’t have good data on which to start root cause analysis. I solved Yellow Eyes by

  • Wiping the unit using the factory default setting accessible by the top button, then ‘WIPE’
  • Removing the Device in home.mycroft.ai
  • Rebooting
  • Repairing

Be interested to know if this works for you too, but I understand too that it’s a lot of mucking around.

Best, Kathy

Unfortunately I’ve done all of that over the course of troubleshooting the patch failed error I was getting. Sometimes a reboot will resolve it, but whether it’s still fixed after the next reboot is a flip of a coin. I am noticing this showing up repeatedly in the logs which might have something to do with it. Might not too.

01:29:29.112 - mycroft.skills.settings:_send_settings_meta:195 - ERROR - HTTPSConnectionPool(host='api.mycroft.ai', port=443): Read timed out. (read timeout=15)

I also see this which is interesting but also may or may not be related.

01:28:52.350 - mycroft.client.speech.listener:transcribe:167 - ERROR - Could not request Speech Recognition recognition request failed: Forbidden

What I really need is an image of the default Mark I SDCard so I can just pull it and nuke it with Etcher. I don’t suppose that could be made available (or is available and I’m just illiterate)?

Thanks for that info @linuxrants, I’m going to ping @forslund to see if he has any other suggestions here.

The default Mark 1 Micro SD card image is available at:

https://mycroft.ai/to/mark-1-image

Hi again,

The first is an issue with the server, which occurs if a the device which first uploaded the skill settings were removed. Our backend team is working on a fix for this, it’s a huge general issue but shouldn’t really be a problem for basic functionality.

The second error message is more worrying because it looks like the server isn’t accepting your pairing. You should be getting a pairing code. or at least a reply for the pairing skill.

Have you at some point deleted your device on home.mycroft.ai?

It hasn’t asked for a pairing code recently. @KathyReid suggested reboots, so I rebooted the device until the eyes came up their configured green. This isn’t a permanent state, because when Mycroft gets restarted it usually comes up with the Yellow Eyes. Sometimes I can hear Mycroft talking (though there’s no display on the front panel), but he almost never gives me a pairing code. I have removed my device from home.mycroft.ai before. Sometimes it seems to randomly lose the registration (only maybe 2 or 3 times since I got the unit) and it will ask me to go through the code bit again. When that happens I go to the site and I remove the “old” device and add a “new” device and everything is happy again. It doesn’t fix the Yellow Eye issue permanently though.

That sounds extremely peculiar. Reflashing the device with the latest release might be the best solution to make sure the state of the device is in a good state.

The image that Kathy pointed to is much improved over the one the device was delivered with so if we missed something in the platform patch it should be resolved in the new image.

OK, I’ll give that a shot. Thank you @KathyReid for that link! I really appreciate it! Also, thank you @forslund for your time and help.

Mike

@linuxrants - did flashing things over work for you?