Forums

Can't Import from wtforms

from flask_wtf import FlaskForm from wtforms import StringField, EmailField, PasswordField, SubmitField

But I keep getting this error instead

ImportError: cannot import name 'EmailField' from 'wtforms' (/usr/local/lib/python3.9/site-packages/wtforms/__init__.py)

I have tried installing email email_validator but It still didn't work

That looks like you have a version of wtforms that does not include that field. Check that the version that you're using is the one the code was written for.

//edit: Oh lol, it worked.. I remember trying it before! maybe I didn't reload the website.. thanks a lot though!

Glad to hear that you made it work!