petlib icon indicating copy to clipboard operation
petlib copied to clipboard

Attribute Error when trying to import petlib.pack

Open NullByteSuiteDevs opened this issue 6 years ago • 1 comments

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.

NullByteSuiteDevs avatar Aug 30 '18 20:08 NullByteSuiteDevs

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?)

gdanezis avatar Sep 14 '18 08:09 gdanezis