maxcountryman / flask-bcrypt

Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Home Page:http://readthedocs.org/docs/flask-bcrypt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'module' object has no attribute 'ffi'

archienorman11 opened this issue · comments

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.

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.