OpenBazaar / OpenBazaar-Server

(Deprecated) OpenBazaar 1.0 Server daemon for communication with OpenBazaar-Client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

bladedoyle opened this issue · comments

Brief Description:

Error when starting server (or even getting help message)

Operating System (OS and version): linux, ubuntu, 4.4.0-83-generic
OpenBazaar version: (HEAD detached at v0.2.6)
Hardware: Intel

Reproducible (Always / Almost Always / Sometimes / Rarely / Couldn't Reproduce): Always

Steps to reproduce:

  1. Install depends
  2. clone openbazaar-server git repo and check out v0.2.6 tag
  3. Manually apply fix described in issue #521
  4. Run: python openbazaard.py start --help

Observed Behavior:
Traceback (most recent call last):
File "openbazaard.py", line 12, in
from api.restapi import RestAPI
File "/ob/OpenBazaar-Server/api/restapi.py", line 5, in
import obelisk
File "/usr/local/lib/python2.7/dist-packages/obelisk/init.py", line 3, in
from client import *
File "/usr/local/lib/python2.7/dist-packages/obelisk/client.py", line 3, in
from zmqbase import ClientBase
File "/usr/local/lib/python2.7/dist-packages/obelisk/zmqbase.py", line 11, in
from twisted.internet import defer, reactor
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/reactor.py", line 38, in
from twisted.internet import default
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/default.py", line 56, in
install = _getInstallFunction(platform)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/default.py", line 44, in _getInstallFunction
from twisted.internet.epollreactor import install
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/epollreactor.py", line 24, in
from twisted.internet import posixbase
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 18, in
from twisted.internet import error, udp, tcp
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 29, in
from twisted.internet._newtls import (
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/_newtls.py", line 21, in
from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/tls.py", line 41, in
from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import rand, crypto, SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 124, in
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

Expected Behavior:

the help message

Additional info (links, images, etc go here):

none

Ah, this is fixed by using pyopenssl==16.2.0
(probably needs to be updated in requirements.txt)

find whitch version of pyopenssl you have (maybe in this time 17.3.0)
open requirements.txt in the folder /home/OpenBazaar-server - open folder in termninal
through terminal write sudo gedit requirements.txt and update your pyopenssl==17.3.0 (depend on your current python version)
save and run open bazaar command again / its should to work, atleast worked for me

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!