Mycroft-core: AttributeError: objek 'modul' tidak memiliki atribut 'SSL_ST_INIT'

Dibuat pada 27 Apr 2017  ·  18Komentar  ·  Sumber: MycroftAI/mycroft-core

Saat menginstal mycroft-core dari AUR saya mendapatkan kesalahan berikut saat mencoba memulai layanan.

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

Komentar yang paling membantu

Anda perlu menginstal ulang paket pip setelah perubahan.

pip uninstall pyOpenSSL
pip install pyOpenSSL==16.2.0

Anda juga menggunakan OS apa?

Semua 18 komentar

mengubah pyOpenSSL==16.0.0 di requirements.txt menjadi pyOpenSSL==16.2.0 memperbaiki ini.

Saya mengubahnya dan masih mengalami masalah ini

Anda perlu menginstal ulang paket pip setelah perubahan.

pip uninstall pyOpenSSL
pip install pyOpenSSL==16.2.0

Anda juga menggunakan OS apa?

Saya di Arch, saya melakukan itu seperti yang diminta, masih:
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'

Saya juga mencoba menginstal versi distro saya, karena seseorang di AUR mengatakan itu akan memperbaikinya. Sejauh ini semua upaya untuk mengubah pyopenssl gagal memperbaiki masalah.

Kesalahan yang sama ketika saya menjalankan dev_setup.sh

Coba instal dari Git, AUR sudah usang dan jelas rusak.

Saya sudah mencobanya dari git. Saya mencoba AUR setelah saya tidak bisa membuatnya bekerja dan berpikir orang lain lebih beruntung

Saya juga memiliki masalah ini di desktop saya dengan Arch Linux. Saya telah menginstal manjaro di laptop saya dan tidak memiliki masalah ini, mungkinkah semacam masalah ketergantungan yang tidak terdaftar?

Saya percaya ini mungkin tidak cocok dengan versi sistem openSSL dan versi pyOpenSSL di mycroft virtualenv. Meski tidak 100% yakin. Seperti yang dinyatakan di atas oleh @BoBeR182 di atas, memperbarui pyOpenSSL adalah kemungkinan perbaikan

Ya saya sudah mencoba di atas. Bahkan mencoba membangun kembali baru setelah mengubah dep. Masih masalah yang sama.

Pada raspberry Pi saya, saya mengubah pyopenssl menjadi 17.0.0 dan berhasil. Saya harus menghapus seluruh virtualenv dan menjalankan kembali dev_setup untuk mendapatkan lingkungan kerja dan kemudian saya perlu memutakhirkan beberapa paket untuk menjalankan semuanya =/

Masalah yang sama untuk saya di Arch dengan 17.0.0 juga ...

SUDAHLAH!
Menghapus seluruh folder env di ~ dan menjalankan kembali dev.setup membuatnya berfungsi. Maaf atas kebisingannya

Jika ini adalah perbaikan yang dikonfirmasi belum?

Harus. Saya hanya ingin tahu apakah kita harus menaikkannya ke 16.2.0 atau sampai ke 17.0.0?

16.2.0 bekerja untuk saya setelah menghapus folder ~/.virtualenv, jadi ya perbaikan yang dikonfirmasi.

Saya tidak berpikir kita harus pergi jauh-jauh ke 17.0.0

Hebat, itulah yang ingin saya dengar!

Memutakhirkan pyOpenSSL ke 16.2.0 memperbaiki masalah saya.
pip hapus instalan pyOpenSSL
pip instal pyOpenSSL==16.2.0

Saya juga melihat kesalahan AttributeError: 'module' object has no attribute 'SSL_ST_INIT' dan sudo pip install pyOpenSSL==16.2.0 menyelesaikannya untuk saya!

+1 berfungsi untuk saya

Apakah halaman ini membantu?
0 / 5 - 0 peringkat