Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python A Social Network with Flask Making Strong Users Class Method

Andy Hughes
Andy Hughes
8,478 Points

Trying to install flask-bcrypt in VSCode

Just in case anyone else is using VSCode to do their projects etc, I've just tried to install flask-bcrypt, which seemed to install just fine. Then when I tried to call from flask.ext.bcrypt import generate_password_hash, I got an error saying module not found.

Digging into this I found that if instead, I installed bcrypt using pip install flask_bcrypt and then used from flask_bcrypt import generate_password_hash, it worked and the errors disappeared. I think it's the same with the login module too.

Hope that's useful for someone else.

TeamTreeHouse - Would be good if you could add an overlay, or some teachers notes explaining this anomaly to the video. :)