gdanezis / petlib

A python library that implements a number of Privacy Enhancing Technolgies
BSD 2-Clause "Simplified" License
130 stars 33 forks source link

Attribute Error when trying to import petlib.pack #18

Open NullByteSuiteDevs opened 6 years ago

NullByteSuiteDevs commented 6 years ago

When attempting to import petlib.pack I get the following error:

Support not loading the library to build docs without compiling. Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/petlib-0.0.43-py2.7-linux-armv7l.egg/petlib/pack.py", line 32, in from .ec import EcGroup, EcPt File "/usr/local/lib/python2.7/dist-packages/petlib-0.0.43-py2.7-linux-armv7l.egg/petlib/ec.py", line 2, in from .bn import Bn, force_Bn, get_ctx File "/usr/local/lib/python2.7/dist-packages/petlib-0.0.43-py2.7-linux-armv7l.egg/petlib/bn.py", line 794, in zero = Bn(0) File "/usr/local/lib/python2.7/dist-packages/petlib-0.0.43-py2.7-linux-armv7l.egg/petlib/bn.py", line 222, in init self.bn = _C.BN_new() AttributeError: 'NoneType' object has no attribute 'BN_new'

I tried following the error put was left puzzled when it came down to /usr/local/lib/python2.7/dist-packages/petlib-0.0.43-py2.7-linux-armv7l.egg/petlib/

Can provide debug information as needed.

gdanezis commented 6 years ago

Thanks for this bug report -- I notice that you are on an ARM system, which I have never tested against. The most likely reason for the bug is that the C library, built though cffi, has not in fact been built (built errors?/Installation errors?) and thus the _C types are assigned to None as a backup.

Did you have any luck calling other functions from the library? (I suppose not?)