AttributeError: 'module' object has no attribute 'ffi'
archienorman11 opened this issue · 1 comments
archienorman11 commented
Can anyone help shed some light on this error? I dont experience any issues if I run my application locally or on a Ubuntu Instance. However, when deploying via AWS Beanstalk I get this error.
File "/opt/python/run/venv/lib64/python2.7/site-packages/bcrypt/__init__.py", line 82, in hashpw
hashed = _bcrypt.ffi.new("char[]", 128)
AttributeError: 'module' object has no attribute 'ffi'
Any suggestion much appreciated.
FYI - I have bcrypt==3.1.2
installed.
veggiedefender commented
Do you have other bcrypt modules installed? I had py-bcrypt installed and it was causing this exact problem. After uninstalling it I got errors saying bcrypt
has no function hashpw
or something, so I uninstalled bcrypt
and reinstalled flask_bcrypt
(which then reinstalled the right dependencies). I'm not sure what in those steps did it but it worked.