maxcountryman / flask-bcrypt

Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.
http://readthedocs.org/docs/flask-bcrypt/
Other
324 stars 64 forks source link

ImportError: No module named bcrypt._bcrypt In GAE #41

Open imtiaz-emu opened 7 years ago

imtiaz-emu commented 7 years ago

bcrypt is required to use Flask-Bcrypt ERROR 2016-11-10 09:07:35,749 wsgi.py:263] Traceback (most recent call last): File "/home/emu/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) File "/home/emu/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler handler, path, err = LoadObject(self._handler) File "/home/emu/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject obj = import(path[0]) File "/home/emu/GCP/gcp-bcrypt/main.py", line 5, in from flask.ext.bcrypt import Bcrypt File "/home/emu/GCP/gcp-bcrypt/lib/flask/exthook.py", line 81, in load_module reraise(exc_type, exc_value, tb.tb_next) File "/home/emu/GCP/gcp-bcrypt/lib/flask_bcrypt.py", line 27, in raise e ImportError: No module named bcrypt._bcrypt

I've create a Google App Engine project. And add Flask-Bcrypt in my requirements.txt file. Then install the dependencies in my project lib folder. When I run the project this gives me above error. But my Flask module which is also a 3rd party library works fine. What's the solution? I'm using Python 2.7

bw4sz commented 7 years ago

I also have this problem, any solutions?

ButeForce commented 6 years ago

I have the same issue , I'm using python3 , flask-restful and wanted to use flask_bcrypt to hash users passwords stored in database, when I run the solution by python3 app.py, everything works perfectly and I can hash the passwords and validate them , but when I run the solution through uwsgi uwsgi uwsgi.ini

I get internal server error when I try to authenticate.

When I review the log file , I get the following error: from flask_bcrypt import Bcrypt ,check_password_hash ImportError: No module named 'flask_bcrypt' unable to load app 0 (mountpoint='') (callable not found or import error) . Although I can import it successfully from command line as well.

I tried to do one solution suggested in :

No module named 'flask_bcrypt'

and to add "#@UnresolvedImport" to import but still didn't work.

MaHmoudAlmoKdaD commented 4 years ago

i have the same problem

alanhamlett commented 2 years ago

I think this is related to bcrypt not being pure python, so it's not compatible with gae: https://stackoverflow.com/questions/23482258/how-to-use-bcrypt-on-google-app-engine-gae