airflow.exceptions.AirflowException: Could not create Fernet object: Incorrect padding

坑爹airflow,按着教程安装也全是坑
执行到airlfow initdb的时候报错,说找不到cryptography.fernet
然后安装了cryptography
结果又出了airflow.exceptions.AirflowException: Could not create Fernet object: Incorrect padding这个错

根据http://mail-archives.apache.org/mod_mbox/airflow-commits/201801.mbox/%3CJIRA.13128871.1515174724000.583529.1515174960159@Atlassian.JIRA%3E,出现这个问题的原因在于fernet key
需要修改airflow.cfg (默认位于~/airflow/)里的fernet_key
使用python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"这个命令生成一个key
然后替换airflow.cfg里的fernet_key
再执行airflow initdb 或airflow resetdb
就可以了

你可能感兴趣的:(airflow.exceptions.AirflowException: Could not create Fernet object: Incorrect padding)