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 trialChase Svoboda
Python Development Techdegree Graduate 8,466 PointsError 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?
2 Answers
Megan Amendola
Treehouse TeacherThose look like the HTML required error messages to me. They come from having a required attribute in your HTML input.
Andy Hughes
8,479 PointsFor 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).
Chase Svoboda
Python Development Techdegree Graduate 8,466 PointsChase Svoboda
Python Development Techdegree Graduate 8,466 PointsI was expecting an error for the username to appear as "Username should be one word, letters, numbers, and underscores only"