Build an open future with us.

Invest in Mycroft and become a community partner.

Unable to run mycroft-core CLI since last Friday noon


#1

Feel free to chew me out if I have mis-posted.
Last week, I was playing with cloning custom skills in a fully functioning mycroft-core environment on a Linux Mint workstation. After re-installing mycroft-core without incident (no error messages I could see), the cli interface just stopped working instead of going into interactive mode.

Trying to start up the client with ./start-mycroft.sh debug shows the following:
starting all mycroft-core services
Initializing...
Starting background service bus
Starting background service skills
Starting background service audio
Starting background service voice
Starting cli
but nothing started!

The log files created from the startup look like this:
Traceback (most recent call last):
** File “/home/brian/mycroft-core/mycroft/messagebus/service/main.py”, line 17, in **
** from mycroft.configuration import ConfigurationManager**
ImportError: No module named mycroft.configuration

I have tried re-installing mycroft core 4 times with no change.

Any suggestions would be welcome at this point as I am due to give a presentation at work on Mycroft Thursday aft…

Regards,
Brian


#2

hmm weird. Seems like it can’t find the mycroft module. have you re ran ./dev_setup.sh? also could you try running ./start_mycroft.sh on sudo?


#3

In the 5 or 6 times I have re-installed mycroft, I have performed the git clone, executed ./dev_setup.sh and then tried ./start-mycroft (all, cli, or debug). When that did not work, run ./update-dev.sh.

Prior to Friday, the execution of ./start-mycroft cli was ALWAYS successful.

Regards,
Brian


#4

@swaile51 it sounds like there may be something wrong with the virtual environment. check if virtualenv is a command. If so try the command ~/.virtualenvs/mycroft/bin/python -m mycroft.messagebus.service.main. See if that works.


#5

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


#6

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


#7

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


#8

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.


#9

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


#10

Glad you got it running!


#11

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.


#12

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

#13

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.


#14

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 ?


#15

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.


#16

@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 ?


#17

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


#18

@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


#19

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.


#20

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 !