AttributeError: 'CompiledFFI' object has no attribute 'def_extern'

Bug #1585166 reported by Adrian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
twisted (Ubuntu)
Fix Released
Undecided
Adrian

Bug Description

Way to reproduce:
$> python
>>> from twisted.internet import protocol, reactor, error

I am getting the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "./license_proxy/__main__.py", line 3, in <module>
  File "/usr/lib/python2.7/dist-packages/twisted/internet/reactor.py", line 38, in <module>
    from twisted.internet import default
  File "/usr/lib/python2.7/dist-packages/twisted/internet/default.py", line 56, in <module>
    install = _getInstallFunction(platform)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/default.py", line 44, in _getInstallFunction
    from twisted.internet.epollreactor import install
  File "/usr/lib/python2.7/dist-packages/twisted/internet/epollreactor.py", line 24, in <module>
    from twisted.internet import posixbase
  File "/usr/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 18, in <module>
    from twisted.internet import error, udp, tcp
  File "/usr/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 29, in <module>
    from twisted.internet._newtls import (
  File "/usr/lib/python2.7/dist-packages/twisted/internet/_newtls.py", line 21, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/tls.py", line 41, in <module>
    from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
  File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/rand.py", line 11, in <module>
    from OpenSSL._util import (
  File "/usr/lib/python2.7/dist-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 68, in <module>
    error=-1)
  File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 57, in wrapper
    ffi.def_extern(name=name, **kwargs)(func)
AttributeError: 'CompiledFFI' object has no attribute 'def_extern'

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: python-twisted 16.0.0-1
ProcVersionSignature: Ubuntu 4.4.0-23.41-generic 4.4.10
Uname: Linux 4.4.0-23-generic x86_64
NonfreeKernelModules: openafs
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Tue May 24 13:14:29 2016
InstallationDate: Installed on 2015-04-02 (417 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
PackageArchitecture: all
SourcePackage: twisted
UpgradeStatus: Upgraded to xenial on 2016-04-26 (27 days ago)

Revision history for this message
Adrian (adrianf0) wrote :
Revision history for this message
Barry Warsaw (barry) wrote : Re: [Bug 1585166] [NEW] AttributeError: 'CompiledFFI' object has no attribute 'def_extern'

On May 24, 2016, at 11:21 AM, Adrian wrote:

>Public bug reported:
>
>Way to reproduce:
>$> python
>>>> from twisted.internet import protocol, reactor, error

Works for me in 16.04.

Revision history for this message
Adrian (adrianf0) wrote :

Apparently there was some clash with PIP.
In order to fix I called:
$ sudo pip install twisted
$ sudo pip install cryptography
$ sudo pip uninstall cryptography
$ sudo pip uninstall twisted
And then I reinstalled Ubuntu's packages:
$ sudo apt-get install --reinstall python-cryptography
$ sudo apt-get install --reinstall python-openssl
$ sudo apt-get install --reinstall python-twisted

Changed in twisted (Ubuntu):
status: New → Fix Released
assignee: nobody → Adrian (adrianf0)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.