我们开始使用 Airflow 2.0,但在创建初始管理员用户时遇到了一个奇怪的问题。Airflow 的安装和运行airflow db init
似乎运行良好,但是当我们运行命令时,airflow users create -u <username> --use-random-password -f <firstname> -l <lastname> -r Admin -e <emailaddress>
我们得到下面列出的错误重复了大约 50 次:
[2021-01-27 20:42:13,801] {base.py:593} ERROR - Add Permission on View Error: 'NoneType' object has no attribute 'permissions'
[2021-01-27 20:42:14,261] {base.py:600} ERROR - 'NoneType' object has no attribute 'permissions'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/flask_appbuilder/base.py", line 598, in _add_permissions_menu
self.sm.add_permissions_menu(name)
File "/usr/local/lib/python3.7/dist-packages/flask_appbuilder/security/manager.py", line 1241, in add_permissions_menu
self.add_permission_role(role_admin, pv)
File "/usr/local/lib/python3.7/dist-packages/flask_appbuilder/security/sqla/manager.py", line 594, in add_permission_role
if perm_view and perm_view not in role.permissions:
AttributeError: 'NoneType' object has no attribute 'permissions'
我们找不到任何文档,所以我们真的不知道该怎么做。任何建议将不胜感激。