从 AUR 安装 mycroft-core 时,尝试启动服务时出现以下错误。
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'.
将 $# requirements.txt
pyOpenSSL==16.0.0
更改为pyOpenSSL==16.2.0
可以解决此问题。
我改了还是有这个问题
更改后需要重新安装 pip 包。
pip uninstall pyOpenSSL
pip install pyOpenSSL==16.2.0
另外你在什么操作系统上?
我在 Arch 上,我按照要求做了,仍然:
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'
我还尝试安装我的发行版,因为 AUR 中有人说会修复它。 到目前为止,所有更改 pyopenssl 的尝试都未能解决该问题。
运行 dev_setup.sh 时出现同样的错误
尝试从 Git 安装,AUR 已过时且明显损坏。
我已经从 git 试过了。 当我无法让它工作并认为其他人有更多的运气之后,我尝试了 AUR
我的 Arch Linux 桌面上也有这个问题。 我的笔记本电脑上安装了manjaro,没有这个问题,可能是某种未列出的依赖问题?
我相信这可能与系统的openSSL版本和mycroft virtualenv中的pyOpenSSL版本不匹配。 虽然不是 100% 肯定。 正如上面@BoBeR182所述,更新 pyOpenSSL 是一种可能的解决方法
是的,我已经在上面尝试过。 甚至尝试在更改 dep 后重新构建。 还是同样的问题。
在我的树莓派上,我将 pyopenssl 更改为17.0.0
并取得了成功。 我不得不删除整个 virtualenv 并重新运行 dev_setup 以获得一个工作环境,然后我需要升级一些软件包以使一切正常运行 =/
我在 Arch 上也遇到了同样的问题 17.0.0...
没关系!
删除 ~ 中的整个 env 文件夹并重新运行 dev.setup 让它工作。 对不起噪音
如果这是一个确认的修复呢?
它应该是。 我只是想知道我们是否应该将它提升到 16.2.0 或一直到 17.0.0?
删除 ~/.virtualenv 文件夹后,16.2.0 为我工作,所以是的,确认修复。
我认为我们不需要一直到 17.0.0
太好了,这就是我想听到的!
将 pyOpenSSL 升级到 16.2.0 解决了我的问题。
pip 卸载 pyOpenSSL
pip install pyOpenSSL==16.2.0
我也看到了AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
错误, sudo pip install pyOpenSSL==16.2.0
为我解决了它!
+1 对我有用
最有用的评论
更改后需要重新安装 pip 包。
pip uninstall pyOpenSSL
pip install pyOpenSSL==16.2.0
另外你在什么操作系统上?