Mycroft-core: AttributeError: 'Modul'-Objekt hat kein Attribut 'SSL_ST_INIT'

Erstellt am 27. Apr. 2017  ·  18Kommentare  ·  Quelle: MycroftAI/mycroft-core

Bei der Installation von mycroft-core aus dem AUR erhalte ich beim Versuch, den Dienst zu starten, die folgende Fehlermeldung.

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'.

Hilfreichster Kommentar

Sie müssen das Pip-Paket nach der Änderung neu installieren.

pip uninstall pyOpenSSL
pip install pyOpenSSL==16.2.0

Und auf welchem ​​OS bist du?

Alle 18 Kommentare

Das Ändern pyOpenSSL==16.0.0 in requirements.txt in pyOpenSSL==16.2.0 behebt dieses Problem.

Ich habe es geändert und habe immer noch dieses Problem

Sie müssen das Pip-Paket nach der Änderung neu installieren.

pip uninstall pyOpenSSL
pip install pyOpenSSL==16.2.0

Und auf welchem ​​OS bist du?

Ich bin auf Arch, ich habe das wie gewünscht gemacht, immer noch:
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'

Ich habe auch versucht, die Version meiner Distribution zu installieren, da jemand in AUR sagte, das würde das Problem beheben. Bisher sind alle Versuche, pyopenssl zu ändern, fehlgeschlagen, um das Problem zu beheben.

Gleicher Fehler, wenn ich dev_setup.sh ausführe

Versuchen Sie, von Git zu installieren, der AUR ist veraltet und eindeutig defekt.

Ich habe es von git versucht. Ich habe AUR danach ausprobiert, als ich es nicht zum Laufen bringen konnte und dachte, jemand anderes hätte mehr Glück

Ich habe dieses Problem auch auf meinem Desktop mit Arch Linux. Ich habe Manjaro auf meinem Laptop installiert und habe dieses Problem nicht, könnte es eine Art Abhängigkeitsproblem sein, das nicht aufgeführt ist?

Ich glaube, es könnte ein Missverhältnis zwischen der openSSL-Version des Systems und der pyOpenSSL-Version in mycroft virtualenv sein. Allerdings nicht 100% sicher. Wie oben von @BoBeR182 erwähnt, ist das Aktualisieren von pyOpenSSL eine mögliche Lösung

Ja habe ich oben schon versucht. Sogar versucht, neu aufzubauen, nachdem die dep geändert wurde. Immer noch das gleiche Problem.

Auf meinem Himbeer-Pi habe ich pyopenssl in 17.0.0 geändert und hatte Erfolg. Ich musste die gesamte virtuelle Umgebung löschen und dev_setup erneut ausführen, um eine funktionierende Umgebung zu erhalten, und dann musste ich einige der Pakete aktualisieren, um alles zum Laufen zu bringen =/

Dasselbe Problem für mich auch auf Arch mit 17.0.0 ...

EGAL!
Das Löschen des gesamten env-Ordners in ~ und das erneute Ausführen von dev.setup hat es zum Laufen gebracht. Sorry für den Lärm

Ist dies bereits ein bestätigter Fix?

Es sollte sein. Ich frage mich nur, ob wir es auf 16.2.0 oder ganz auf 17.0.0 erhöhen sollten?

16.2.0 funktionierte für mich, nachdem ich den Ordner ~/.virtualenv entfernt hatte, also ja bestätigter Fix.

Ich glaube nicht, dass wir bis 17.0.0 gehen müssen

Super, das wollte ich hören!

Das Upgrade von pyOpenSSL auf 16.2.0 hat mein Problem behoben.
pip pyOpenSSL deinstallieren
pip installiere pyOpenSSL==16.2.0

Ich habe auch den Fehler AttributeError: 'module' object has no attribute 'SSL_ST_INIT' gesehen und sudo pip install pyOpenSSL==16.2.0 hat ihn für mich behoben!

+1 funktioniert für mich

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

ryanleesipes picture ryanleesipes  ·  4Kommentare

mghoffmann picture mghoffmann  ·  6Kommentare

WSLUser picture WSLUser  ·  9Kommentare

beemorris picture beemorris  ·  6Kommentare

tmajibon picture tmajibon  ·  9Kommentare