Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

464
Views
ModuleNotFoundError: No module named 'wtforms.fields.html5'

I have a flask app that uses wtforms.

I have a file which does:

from wtforms.fields.html5 import DateField, EmailField, TelField

# rest of the file

I just wanted to rebuild my docker container and now I have this error:

ModuleNotFoundError: No module named 'wtforms.fields.html5'

I have in my requirements.txt:

flask
flask-login
flask_sqlalchemy
Flask-Mail
pyodbc
requests
waitress
wtforms

I tried to add flask_WTF but it did not fix it.

Any idea what's going on? I thought of upgrading wtforms but it seems like I have the newest version:

pip install wtforms
Requirement already satisfied: wtforms in /usr/local/lib/python3.9/site-packages (3.0.0)
Requirement already satisfied: MarkupSafe in /usr/local/lib/python3.9/site-packages (from wtforms) (2.0.1)
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Downgrading WTForms==2.3.3 solved the issue for me. Thread referenced here.

over 4 years ago · Santiago Trujillo Report

0

For WTForms >= 3.0.0, just use wtforms.fields to import these classes, as the html5 module seems to have been retired in 3.0.0a1. So in your case:

from wtforms.fields import DateField, EmailField, TelField

See the WTForms documentation on fields for details (for example for EmailField).

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!