Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'wtforms.compat' #649

Open
kurvaraviteja355 opened this issue Dec 7, 2021 · 5 comments
Open

ModuleNotFoundError: No module named 'wtforms.compat' #649

kurvaraviteja355 opened this issue Dec 7, 2021 · 5 comments

Comments

@kurvaraviteja355
Copy link

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'

@brandoncfsx
Copy link

brandoncfsx commented Dec 10, 2021

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.

@charlesfranciscodev
Copy link

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

@srjth19
Copy link

srjth19 commented Jan 13, 2022

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.

@ednarb29
Copy link

Pinning the version worked for me as well.

@nabinkhadka
Copy link

What exactly did you pin @ednarb29 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants