pythondjangoopensslrollbar

rollbar django suddenly not working. AttributeError: module 'lib' has no attribute 'X509_up_ref'


My rollbar suddenly does not work on my django python app. It was working previously until i merge something. it looks more like openssl issue?

>>> import rollbar
>>> rollbar.init('xxxxxx', 'production') 
>>> rollbar.report_message('Got an IOError in the main loop', 'warning')
'xxxx-xxx-xxx-xxx-xxx'
>>> From cffi callback <function _verify_callback at 0x7f08351e8730>:
Traceback (most recent call last):
  File "/home/deploy/railerdotcom/railerdotcomenv/lib/python3.5/site-packages/OpenSSL/SSL.py", line 313, in wrapper
    _lib.X509_up_ref(x509)
AttributeError: module 'lib' has no attribute 'X509_up_ref'

I am using:

Django==1.11.7
Ubuntu version 16.04

Solution

  • This is happening because pyOpenssl requires cryptography 2.1.4 or greater:

    https://github.com/pyca/pyopenssl/issues/728