airflow-tutorial icon indicating copy to clipboard operation
airflow-tutorial copied to clipboard

webserver_1 | ModuleNotFoundError: No module named 'wtforms.compat'

Open ApplesHaveFeelings opened this issue 3 years ago • 2 comments

i tried following https://github.com/tuanavu/airflow-tutorial/issues/52 and https://github.com/tuanavu/airflow-tutorial/issues/51 to get past the mysql error, but now im getting a wtforms.compat error. i tried suggestions from this post downgrading the wtforms version https://exerror.com/modulenotfounderror-no-module-named-wtforms-compat/

Starting airflow-tutorial_postgres_1 ... done
Recreating airflow-tutorial_webserver_1 ... done
Attaching to airflow-tutorial_postgres_1, airflow-tutorial_webserver_1
postgres_1   |
postgres_1   | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_1   |
postgres_1   | LOG:  database system was interrupted; last known up at 2022-01-07 07:30:52 UTC
postgres_1   | LOG:  database system was not properly shut down; automatic recovery in progress
postgres_1   | LOG:  invalid record length at 0/14EF268: wanted 24, got 0
postgres_1   | LOG:  redo is not required
postgres_1   | LOG:  MultiXact member wraparound protections are now enabled
postgres_1   | LOG:  database system is ready to accept connections
postgres_1   | LOG:  autovacuum launcher started
postgres_1   | LOG:  incomplete startup packet
webserver_1  | [2022-01-07 07:31:41,791] {{settings.py:253}} INFO - settings.configure_orm(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=8
webserver_1  | Traceback (most recent call last):
webserver_1  |   File "/usr/local/bin/airflow", line 26, in <module>
webserver_1  |     from airflow.bin.cli import CLIFactory
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/airflow/bin/cli.py", line 70, in <module>
webserver_1  |     from airflow.www.app import (cached_app, create_app)
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/airflow/www/app.py", line 37, in <module>
webserver_1  |     from airflow.www.blueprints import routes
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/airflow/www/blueprints.py", line 25, in <module>
webserver_1  |     from airflow.www import utils as wwwutils
webserver_1  |   File "/usr/local/lib/python3.7/site-packages/airflow/www/utils.py", line 35, in <module>
webserver_1  |     from wtforms.compat import text_type
webserver_1  | ModuleNotFoundError: No module named 'wtforms.compat'

docker version: 20.10.8 docker-compose version 1.29.2, build 5becea4c airflow version: 2.2.3 MacOs Monterey 12.0.1

ApplesHaveFeelings avatar Jan 07 '22 07:01 ApplesHaveFeelings

I had the same issue and solved it by setting wtforms to 2.3.3 before building the image. Source - https://github.com/puckel/docker-airflow/issues/649

rusgarifull avatar Jan 13 '22 12:01 rusgarifull

have the same issue with airflow version: 2.0.0 python version is 3.10.11

machineCYC avatar Jul 09 '23 08:07 machineCYC