Help us understand the problem. What is going on with this article?

airflow initdb実行時にImportError(CSRFProtect)が出たときの解決方法

More than 1 year has passed since last update.

事象

airflow initdb実行時にこんな感じのエラーが出た

log
Traceback (most recent call last):
  File "/usr/bin/airflow", line 18, in <module>
    from airflow.bin.cli import CLIFactory
  File "/usr/lib/python2.7/site-packages/airflow/bin/cli.py", line 59, in <module>
    from airflow.www.app import cached_app
  File "/usr/lib/python2.7/site-packages/airflow/www/app.py", line 21, in <module>
    from flask_wtf.csrf import CSRFProtect
ImportError: cannot import name CSRFProtect

解決方法

以下のコマンドを実行してflask-wtfをアップデートする
pip install --user --upgrade flask-wtf

参考

Can't import csrf module from within flask_wtf

lyrical_erica
最近はphp、前はJavaをメインに書いてます。 あとCentOS7もいじってます。 趣味はpython。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away