Issue
I’m getting this error when trying to use Airflow on WSL. Not sure what the issue is - I upgraded Flask &
werkzeug
.File "/usr/local/bin/airflow", line 21, in <module> from airflow import configuration File "/usr/local/lib/python3.5/dist-packages/airflow/__init__.py", line 40, in <module> from flask_admin import BaseView File "/usr/local/lib/python3.5/dist-packages/flask_admin/__init__.py", line 6, in <module> from .base import expose, expose_plugview, Admin, BaseView, AdminIndexView # noqa: F401 File "/usr/local/lib/python3.5/dist-packages/flask_admin/base.py", line 6, in <module> from flask import Blueprint, current_app, render_template, abort, g, url_for File "/usr/local/lib/python3.5/dist-packages/flask/__init__.py", line 21, in <module> from .app import Flask File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 69, in <module> from .wrappers import Request File "/usr/local/lib/python3.5/dist-packages/flask/wrappers.py", line 14, in <module> from werkzeug.wrappers.json import JSONMixin as _JSONMixin ImportError: No module named 'werkzeug.wrappers.json'; **'werkzeug** .wrappers' is not a package
Fix
This is a bug that got introduce into Flask and worked its way into Airflow and one of our Docker images. You’ll need to do 1 of 2 things:
- Change the Dockerfile to FROM Quay
OR
- In
requirements.txt
, pin Flask to “Flask=1.0.0”
This bug should be resolved by this PR in Airflow 1.10.4.