johnmaguire / Cardinal

A Python IRC bot, designed to make adding functionality quick and simple. (est. 2013)
MIT License
100 stars 38 forks source link

Error while starting Cardinal bot #132

Closed ameygat closed 7 years ago

ameygat commented 7 years ago

I only made following changes to default config

"nickname": "Cardinal321",
"password": "",
"network": "irc.spotchat.org",
"server_password": "",
"port": 6667,
"ssl": false,
"storage": "storage/",
"channels": [
    "#test321","test4321"
],

When I run bot I am getting Error

Traceback (most recent call last):
  File "cardinal.py", line 10, in <module>
    from twisted.internet import reactor
  File "/home/a/irc/env/local/lib/python2.7/site-packages/twisted/internet/reactor.py", line 38, in <module>
    from twisted.internet import default
  File "/home/a/irc/env/local/lib/python2.7/site-packages/twisted/internet/default.py", line 56, in <module>
    install = _getInstallFunction(platform)
  File "/home/a/irc/env/local/lib/python2.7/site-packages/twisted/internet/default.py", line 44, in _getInstallFunction
    from twisted.internet.epollreactor import install
  File "/home/a/irc/env/local/lib/python2.7/site-packages/twisted/internet/epollreactor.py", line 24, in <module>
    from twisted.internet import posixbase
  File "/home/a/irc/env/local/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 24, in <module>
    from twisted.internet import error, udp, tcp
  File "/home/a/irc/env/local/lib/python2.7/site-packages/twisted/internet/tcp.py", line 29, in <module>
    from twisted.internet._newtls import (
  File "/home/a/irc/env/local/lib/python2.7/site-packages/twisted/internet/_newtls.py", line 21, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/home/a/irc/env/local/lib/python2.7/site-packages/twisted/protocols/tls.py", line 40, in <module>
    from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
  File "/home/a/irc/env/local/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/home/a/irc/env/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 118, in <module>
    SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
johnmaguire commented 7 years ago

@ameygat What version of OpenSSL is installed on your machine?

johnmaguire commented 7 years ago

Please try pyOpenSSL 16.2.0 and report back if the issue goes away. Thanks! :+1:

ameygat commented 7 years ago

I installed pyOpenSSL 16.2.0 and it worked thanks a lot. I think the requirements.txt need to be updated it has following version:

# SSL connections
pyOpenSSL==0.15.1 
johnmaguire commented 7 years ago

Thank you very much for this report! I will definitely update the deps. :+1: