Unable to run mycroft-core CLI since last Friday noon

I get the following:

`brian@brian-Latitude-E5530-non-vPro ~/mycroft-core $ virtualenv
Running virtualenv with interpreter /usr/bin/python2
You must provide a DEST_DIR
Usage: virtualenv.py [OPTIONS] DEST_DIR

Options:
–version show program’s version number and exit
-h, --help show this help message and exit
etc…
`
When I run the full command I see the following:

brian@brian-Latitude-E5530-non-vPro ~/mycroft-core $ ~/.virtualenvs/mycroft/bin/python -m mycroft.messagebus.service.main 09:35:28.359 - mycroft.configuration:load_defaults:242 - INFO - Loading configuration: mycroft/configuration/mycroft.conf 09:35:28.360 - mycroft.configuration:__load:117 - DEBUG - Configuration 'mycroft/configuration/mycroft.conf' loaded 09:35:28.361 - mycroft.configuration:__load:122 - DEBUG - Configuration '/home/brian/.mycroft/mycroft.conf' not found 09:35:28.362 - mycroft.configuration:load_defaults:242 - INFO - Loading configuration: mycroft.ai 09:35:28.365 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai 09:35:28.809 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device/77a4873b-1559-4813-96e9-8c61c32818d8/setting HTTP/1.1" 200 4 09:35:28.812 - requests.packages.urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.mycroft.ai 09:35:29.221 - requests.packages.urllib3.connectionpool - DEBUG - https://api.mycroft.ai:443 "GET /v1/device/77a4873b-1559-4813-96e9-8c61c32818d8/location HTTP/1.1" 200 4 09:35:29.227 - mycroft.configuration:load:157 - WARNING - Failed to fetch remote configuration: AttributeError("'NoneType' object has no attribute 'iteritems'",) 09:35:29.229 - mycroft.configuration:__load_cache:199 - INFO - Using cached configuration if available 09:35:29.232 - mycroft.configuration:__load:122 - DEBUG - Configuration '/opt/mycroft/web_config_cache.json' not found 09:35:29.234 - mycroft.configuration:load_defaults:242 - INFO - Loading configuration: /etc/mycroft/mycroft.conf 09:35:29.236 - mycroft.configuration:__load:122 - DEBUG - Configuration '/etc/mycroft/mycroft.conf' not found 09:35:29.239 - mycroft.configuration:__load:122 - DEBUG - Configuration '/home/brian/.mycroft/mycroft.conf' not found 09:35:29.241 - mycroft.configuration:load_defaults:242 - INFO - Loading configuration: /home/brian/.mycroft/mycroft.conf 09:35:29.243 - mycroft.configuration:__load:122 - DEBUG - Configuration '/home/brian/.mycroft/mycroft.conf' not found 09:35:29.246 - mycroft.configuration:__load:122 - DEBUG - Configuration '/home/brian/.mycroft/mycroft.conf' not found
Regards,
Brian

I tried running start-mycroft with sudo and got the following:

brian@brian-Latitude-E5530-non-vPro ~/mycroft-core $ sudo ./start-mycroft.sh cli Initializing... Changing ownership of /opt/mycroft to user: root with group: root changed ownership of '/opt/mycroft/skills' from brian:brian to root:root changed ownership of '/opt/mycroft' from brian:brian to root:root Starting cli brian@brian-Latitude-E5530-non-vPro ~/mycroft-core $

Forgive my naivetee, but I was under the impression that switching ownership to root was not a good thing.

Regards,
Brian

If it is the virtual environment, would the most time efficient approach to fix the problem to knock the workstation flat and re-install linux and mycroft from the ground up?

Regards,
Brian

You can try sudo apt-get install --reinstall python-virtualenv. After that try ./start-mycroft.sh debug and see if that fixed it for you. Otherwise to get it working even though it’s not ideal open terminal and copy and paste these

WARNING: there will be a lot of output to the terminal

run_mycroft() {
  ~/.virtualenvs/mycroft/bin/python -m mycroft.$1
}

run_mycroft messagebus.service.main &
run_mycroft skills.main &
run_mycroft audio.main &
run_mycorft client.speech.main &
run_mycroft client.text.main # only if you want to run the cli

see if this will start mycroft for you.

I have knocked the workstation flat and reinstalled the os and mycroft-core. Mycroft can now be heard droning down the corridors of my humble abode (for a little while, anyway).

Now I am trying to get where I was last week by loading skills.

Regards,
Brian

2 Likes

Glad you got it running!

I’m having a similar issue. I have installed mycroft-core on Ubuntu 16.04 LTS, fresh install (although I did not remove /opt/mycroft or anything in the home directory). These are my symptoms, which persist after a full reinstall of mycroft-core:

  • ./start-mycroft.sh all -> terminal output shows everything starting OK
  • tail -f of messagebus log consistently shows
$ tail -f mycroft-bus.log 
Traceback (most recent call last):
  File "/home/kathyreid/Dropbox/PHPworkspace/mycroft-core/mycroft/messagebus/service/main.py", line 17, in <module>
    from mycroft.configuration import Configuration
ImportError: No module named mycroft.configuration

Not sure what next steps should be, I’m not prepared to do an OS reinstall.

After reinstalling virtualenv I get

kathyreid@kathyreid-N76VZ:~/Dropbox/PHPworkspace/mycroft-core/scripts/logs$ cat mycroft-skills.log 
Traceback (most recent call last):
  File "/home/kathyreid/Dropbox/PHPworkspace/mycroft-core/mycroft/skills/main.py", line 24, in <module>
    import mycroft.dialog
ImportError: No module named mycroft.dialog
Traceback (most recent call last):
  File "/home/kathyreid/Dropbox/PHPworkspace/mycroft-core/mycroft/skills/main.py", line 24, in <module>
    import mycroft.dialog
ImportError: No module named mycroft.dialog

So this turned out to be a virtualenv issue. I removed my virtualenv and re-installed and it all came good. Big thanks to @forslund for his help.

Hello, I am facing the same issue (and I think i am not the only one) … Would it be possible to have a detailed way of fixing it ?

Hi @Louis_cormaille, sorry to hear you’re experiencing this issue too.

First, remove your existing virtualenv:

sudo rm -R ~/.virtualenv/mycroft/

then, run ~/dev_setup.sh again.

This will rebuild your virtualenv.

Please let me know how you go.

@KathyReid I have already uninstall and reinstalled (deleted and pulled and ran ~/dev_setup.sh ) and it is still not working. I’ll try to do it your way though. I’ll keep you updated. Thanks
EDIT : It now seems to work (at least it is running) but Mycroft does not recognize any of what I am saying … And if I try to write the question in input in debug, it is lagging (like, I can’t even write it) …
It is annoying … another thing : If I try to run ./start-mycroft.sh all, i can hear Mycroft running in the background but there is no GUI, is it normal ?

Hi @Louis_cormaille, thanks for working through that process.

  • When you say that Mycroft does not recognize what you are saying, does every Skill return “I’m sorry I didn’t understand your request”?

  • Lagging is not normal for debug mode, unless the host you’re running on is heavily loaded at the same time. What does top or htop show when you run that at the same time? Is it mycroft-core using all the system resources?

  • ./start-mycroft debug and ./start-mycroft cli will provide a GUI, but ./start-mycroft all does not.

Can you attach your mycroft-skills.log so we can see what’s happening with the skills?

Kind regards,
Kathy

@KathyReid
Every Skill returns “I’m sorry I didn’t understand your request”
Here is the mycroft-skills.log file
https://drive.google.com/open?id=1Ua0sTOVi4l4eVjjsR9-GCvUR0TO9Kx6s
And ./start-mycroft debug and ./start-mycroft cli don’t provide a GUI

Thanks so much for providing the log, @Louis_cormaille, very useful.

I can see:

  • The device pairs successfully
  • but when asked about the weather, it doesn’t find the intent.

My colleague @forslund might know more about what’s causing the error here - for instance whether Padatious is not picking up the Intent correctly.

With ./start-mycroft debug and ./start-mycroft cli not providing a GUI, if virtualenv has been reinstalled, I’m not sure what to try next, again @forslund may have some suggestions.

I just tried again today with another intent. “what’s the news”. First, Mycroft says it does not understand my request. It does not lag at this moment (I can write and everything). But as soon as I asked this, it asked me to repair the device (as if I did not already paired it yesterday) and it started to lag ( I could not write anymore …) @forslund help would be very appreciated indeed :slight_smile:
Here are the new logs
https://drive.google.com/open?id=1iHeOeUCHjjsuOpDRyfCCpIyD_kz4kiVx
Thank you !

At the top of the skills log file there are a lot of import errors:

ImportError: No module named mycroft.dialog
Traceback (most recent call last):
  File "/home/louis/mycroft-core/mycroft/skills/main.py", line 24, in <module>

but that’s probably the old errors as the process shouldn’t be able to start at all if that was still true.

The skills in question exist but does not seem to ever be loaded. msm exits with an error (-2) which is bad. But I’m not quite certain what that means, but it seems like it gets terminated before it’s done updating. Could be that the messagebus service goes down for some reason.

The messagebus log looks like it’s being terminated by an external signal about the same time as the msm process has problems.

Looking at the mycroft-voice.log it looks like the pairing is complete since it seems to be getting valid responses.

It can take a minute or so for the skill to get loaded since the skills are checked for updates before it’s started. so you might want to start it, leave it alone for a minute or two and then trying to interact with it.

Can you provide platform and OS?

I am running it on Ubuntu. I tried waiting 2 minutes but then, i can’t write anything anymore in the input as it’s lagging.

can you type top in a terminal and see which process is overloading the cpu. And just to be ceertain it’s on a desktop PC right? @Louis_cormaille

also I see there’s a config file: ~/.mycroft/mycroft.conf if there’s no sensitive information in there could you maybe post that as well?