docker-airflow
docker-airflow copied to clipboard
ModuleNotFoundError: No module named 'wtforms.compat'
When i run the dcoker-compose file i am getting this error and i tried to do pip isntall wtforms in dockerfile, but still its same. Please help me to slove this
ModuleNotFoundError: No module named 'wtforms.compat'
I ran into the same issue. What worked for me was pulling the original docker-airflow image and running it. Once inside the container, you can export the list of packages via pip freeze and then run pip install on that exported file inside your dockerfile. The issue had something to do with the version of WTForms.
You can change the version of wtforms before building the docker image with the PYTHON_DEPS
variable, which should fix the issue.
example in docker compose yaml syntax:
version: '3'
services:
webserver:
image: puckel/docker-airflow:1.10.9
build:
context: https://github.com/puckel/docker-airflow.git#1.10.9
dockerfile: Dockerfile
args:
AIRFLOW_DEPS: gcp_api,s3
PYTHON_DEPS: sqlalchemy==1.3.0 wtforms==2.3.3
...
Source: https://stackoverflow.com/questions/69879246/no-module-named-wtforms-compat
You can change the version of wtforms before building the docker image with the
PYTHON_DEPS
variable, which should fix the issue.example in docker compose yaml syntax:
version: '3' services: webserver: image: puckel/docker-airflow:1.10.9 build: context: https://github.com/puckel/docker-airflow.git#1.10.9 dockerfile: Dockerfile args: AIRFLOW_DEPS: gcp_api,s3 PYTHON_DEPS: sqlalchemy==1.3.0 wtforms==2.3.3 ...
Source: https://stackoverflow.com/questions/69879246/no-module-named-wtforms-compat
Ran into the same issue yet again. Have downgraded the version of wtforms==2.3.3 and added to the dependencies in the yml file and yet ModuleNotFoundError: No module named 'wtforms.compat' message persists.
Pinning the version worked for me as well.
What exactly did you pin @ednarb29 ?