When installing mycroft-core from the AUR I get the following error when attempting to start the service.
systemctl --user status mycroft-service.service mycroft-skills.service mycroft-voice.service
● mycroft-service.service - Mycroft main service
Loaded: loaded (/usr/lib/systemd/user/mycroft-service.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2017-04-26 03:05:26 EDT; 49s ago
Main PID: 14053 (bash)
CGroup: /user.slice/user-1000.slice/[email protected]/mycroft-service.service
├─14053 bash /usr/share/mycroft-core/start.sh service
└─14068 python /usr/share/mycroft-core/mycroft/messagebus/service/main.py
Apr 26 03:05:26 $HOSTNAME systemd[1193]: Started Mycroft main service.
Apr 26 03:05:26 $HOSTNAME bash[14053]: Starting service
Apr 26 03:05:26 $HOSTNAME bash[14053]: 2017-04-26 03:05:26,395 - mycroft.configuration - WARNING - Failed to fetch remote configuration: AttributeError("'module' object has no attribute 'SSL_ST_INIT'",)
● mycroft-skills.service - Mycroft skills provider
Loaded: loaded (/usr/lib/systemd/user/mycroft-skills.service; disabled; vendor preset: enabled)
Active: active (running) since Tue 2017-04-25 21:52:28 EDT; 5h 13min ago
Main PID: 2292 (bash)
CGroup: /user.slice/user-1000.slice/[email protected]/mycroft-skills.service
├─2292 bash /usr/share/mycroft-core/start.sh skills
└─2318 python /usr/share/mycroft-core/mycroft/skills/main.py
Apr 26 03:01:21 $HOSTNAME bash[2292]: 2017-04-26 03:01:21,762 - mycroft.messagebus.client.ws - WARNING - WS Client will reconnect in 60 seconds.
Apr 26 03:02:21 $HOSTNAME bash[2292]: 2017-04-26 03:02:21,813 - mycroft.messagebus.client.ws - ERROR - Exception("Uncaught 'error' event.",)
Apr 26 03:02:21 $HOSTNAME bash[2292]: 2017-04-26 03:02:21,814 - mycroft.messagebus.client.ws - WARNING - WS Client will reconnect in 60 seconds.
Apr 26 03:03:21 $HOSTNAME bash[2292]: 2017-04-26 03:03:21,870 - mycroft.messagebus.client.ws - ERROR - Exception("Uncaught 'error' event.",)
Apr 26 03:03:21 $HOSTNAME bash[2292]: 2017-04-26 03:03:21,870 - mycroft.messagebus.client.ws - WARNING - WS Client will reconnect in 60 seconds.
Apr 26 03:04:21 $HOSTNAME bash[2292]: 2017-04-26 03:04:21,907 - mycroft.messagebus.client.ws - ERROR - Exception("Uncaught 'error' event.",)
Apr 26 03:04:21 $HOSTNAME bash[2292]: 2017-04-26 03:04:21,907 - mycroft.messagebus.client.ws - WARNING - WS Client will reconnect in 60 seconds.
Apr 26 03:05:21 $HOSTNAME bash[2292]: 2017-04-26 03:05:21,956 - mycroft.messagebus.client.ws - ERROR - Exception("Uncaught 'error' event.",)
Apr 26 03:05:21 $HOSTNAME bash[2292]: 2017-04-26 03:05:21,956 - mycroft.messagebus.client.ws - WARNING - WS Client will reconnect in 60 seconds.
Apr 26 03:05:36 $HOSTNAME systemd[1193]: [/usr/lib/systemd/user/mycroft-skills.service:3] Failed to add dependency on mycroft-service, ignoring: Invalid argument
● mycroft-voice.service - Mycroft voice processing
Loaded: loaded (/usr/lib/systemd/user/mycroft-voice.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2017-04-26 03:05:38 EDT; 37s ago
Process: 14083 ExecStart=/bin/bash -c source /usr/share/mycroft-core/.virtualenvs/mycroft/bin/activate && /usr/share/mycroft-core/start.sh voice (code=exited, status=1/FAILURE)
Main PID: 14083 (code=exited, status=1/FAILURE)
Apr 26 03:05:38 $HOSTNAME bash[14083]: File "/home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 47, in <module>
Apr 26 03:05:38 $HOSTNAME bash[14083]: import OpenSSL.SSL
Apr 26 03:05:38 $HOSTNAME bash[14083]: File "/home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
Apr 26 03:05:38 $HOSTNAME bash[14083]: from OpenSSL import rand, crypto, SSL
Apr 26 03:05:38 $HOSTNAME bash[14083]: File "/home/$USER/.virtualenvs/mycroft/lib/python2.7/site-packages/OpenSSL/SSL.py", line 124, in <module>
Apr 26 03:05:38 $HOSTNAME bash[14083]: SSL_ST_INIT = _lib.SSL_ST_INIT
Apr 26 03:05:38 $HOSTNAME bash[14083]: AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Apr 26 03:05:38 $HOSTNAME systemd[1193]: mycroft-voice.service: Main process exited, code=exited, status=1/FAILURE
Apr 26 03:05:38 $HOSTNAME systemd[1193]: mycroft-voice.service: Unit entered failed state.
Apr 26 03:05:38 $HOSTNAME systemd[1193]: mycroft-voice.service: Failed with result 'exit-code'.
changing pyOpenSSL==16.0.0
in requirements.txt
to pyOpenSSL==16.2.0
fixes this.
I changed it and still having this issue
You need to reinstall the pip package after the change.
pip uninstall pyOpenSSL
pip install pyOpenSSL==16.2.0
Also what OS are you on?
I am on Arch, I did that as requested, still:
Starting voice
2017-04-29 23:57:00,722 - mycroft.configuration - DEBUG - Configuration '/usr/share/mycroft-core/mycroft/configuration/mycroft.conf' loaded
2017-04-29 23:57:00,723 - mycroft.configuration - DEBUG - Configuration '/etc/mycroft/mycroft.conf' not found
2017-04-29 23:57:00,723 - mycroft.configuration - DEBUG - Configuration '/home/daenerys/.mycroft/mycroft.conf' not found
2017-04-29 23:57:01,200 - mycroft.configuration - WARNING - Failed to fetch remote configuration: AttributeError("'module' object has no attribute 'SSL_ST_INIT'",)
Traceback (most recent call last):
File "/usr/share/mycroft-core/mycroft/client/speech/main.py", line 24, in <module>
from mycroft.client.speech.listener import RecognizerLoop
File "/usr/share/mycroft-core/mycroft/client/speech/listener.py", line 25, in <module>
from requests import HTTPError
File "/home/daenerys/.virtualenvs/mycroft/lib/python2.7/site-packages/requests/__init__.py", line 52, in <module>
from .packages.urllib3.contrib import pyopenssl
File "/home/daenerys/.virtualenvs/mycroft/lib/python2.7/site-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.SSL
File "/home/daenerys/.virtualenvs/mycroft/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/home/daenerys/.virtualenvs/mycroft/lib/python2.7/site-packages/OpenSSL/SSL.py", line 124, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
I also tried installing my distro's version, as someone in AUR said that would fix it. So far all attempts to change pyopenssl have failed fixing the issue.
Same error when I run dev_setup.sh
Try installing from Git, the AUR is outdated and clearly broken.
I have tried it from git. I tried AUR after when I couldn't get it working and thought someone else had more luck
I also have this issue on my desktop with Arch Linux. I have manjaro installed on my laptop and do not have this problem, might it be some kind of dependency problem that is not listed?
I believe it may be a missmatch with the openSSL version of the system and the pyOpenSSL version in the mycroft virtualenv. Not 100% sure though. As stated above by @BoBeR182 above updating the pyOpenSSL is a possible fix
Yea I tried above already. Even tried rebuilding fresh after changing the dep. Still the same issue.
On my raspberry Pi i changed pyopenssl to 17.0.0
and had success. I had to delete the entire virtualenv and re run dev_setup to get a working environment and then I needed to upgrade some of the packages to get everything up and running =/
Same issue for me on Arch with 17.0.0 as well...
NEVERMIND!
Deleting the whole env folder in ~ and re running dev.setup got it to work. Sorry for the noise
If this is a confirmed fix yet?
It should be. I'm just wondering if we should bump it to 16.2.0 or all the way to 17.0.0?
16.2.0 worked for me after removing the ~/.virtualenv folder, so yes confirmed fix.
I dont think we need to go all the way to 17.0.0
Great, that was what I wanted to hear!
Upgrading pyOpenSSL to 16.2.0 fixed my issue.
pip uninstall pyOpenSSL
pip install pyOpenSSL==16.2.0
I saw the AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
error too and sudo pip install pyOpenSSL==16.2.0
resolved it for me!
+1 works for me
Most helpful comment
You need to reinstall the pip package after the change.
pip uninstall pyOpenSSL
pip install pyOpenSSL==16.2.0
Also what OS are you on?