Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Error messages are pop ups rather than statements that indicate what is wrong
I think it's good to mention I'm trying to replicate all of this work on PyCharm because I want it to be local. That said, things are appearing differently when I run the app.
Picture for reference: https://imgur.com/a/pfbv8zV
I'm assuming Flask has gone through many updates considering flask.ext doesn't seem to work when I run it locally. Any ideas what could've happened?
Andy Hughes8,113 Points
For anyone else working on this outside of the TeamTreeHouse workspace editor, Flask has now updated a bunch of times and so if you copy the code into something like PyCharm or VSCode, you're going to get errors and missing modules etc.
So far the biggest changes as of 11/2021 are:
- from flask import Form should now be "from flask import FlaskForm". Then every reference in a class or function should also use "FlaskForm" instead of "Form".
- You may get an error saying you need to install and email_validator. So, just do "pip install email_validator" and you should be good.
- flask.ext.wtforms has now been superceded with flask_wtforms as have the other .ext references.
- validate_on_submit won't work without you doing step 1, as far I can tell.
That's what I've found so far (I'm using VS Code as I want to be able to code outside of workspaces).