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

401
Views
No module named wtforms.compat

While we are trying to execute with python 3.6.8 version getting below module error

from wtforms.compat import string_types, text_type
ModuleNotFoundError: No module named 'wtforms.compat'

when i tried installing or upgrading wtforms still it shows the same error

Can any one pls suggest

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Noticed this error today while running our Airflow 1.10.12 builds:

from wtforms.compat import text_type
ModuleNotFoundError: No module named 'wtforms.compat'

Apparently, the issue has to do with the latest version of wtforms released yesterday (3.0.0). We managed to get around it by pinning it to the previous version: wtforms==2.3.3.

Editing just to add more information: compat.py was completely removed once support for Python < 3.6 was dropped (see PR). If you are running Python >= 3.6, you can also work with the latest wtforms by simply using str instead of text_type and string_types, since those were just aliases:

if sys.version_info[0] >= 3:
    text_type = str
    string_types = (str,)
    izip = zip

And the imports should not be needed anymore.

If running Python < 3.6, you may need to stick with wtforms<=2.3.3.

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!