簡體   English   中英

initdb后Airflow無法進入/admin頁面

[英]Airflow can not enter the /admin page after initdb

我想清除所有示例 dag,以便我運行命令airflow initdb 但是,在那之后我無法進入管理頁面,因為出了點問題:

  File "/data/software/miniconda3/lib/python3.7/site-packages/flask_admin/menu.py", line 126, in is_accessible
    return self._view.is_accessible()
  File "/data/software/miniconda3/lib/python3.7/site-packages/airflow/www/utils.py", line 93, in is_accessible
    (not current_user.is_anonymous and current_user.is_superuser())
  File "/data/software/miniconda3/lib/python3.7/site-packages/airflow/contrib/auth/backends/password_auth.py", line 114, in is_superuser
    return hasattr(self, 'user') and self.user.is_superuser()
AttributeError: 'NoneType' object has no attribute 'is_superuser'

我嘗試創建與以前相同的超級用戶,但仍然出現相同的錯誤。

有什么想法如何解決嗎? 提前致謝。

我通過cleaning the cookie and password stored在瀏覽器中cleaning the cookie and password stored並再次刷新管理員登錄頁面來解決它。 它將正常顯示登錄表單。

不知道這算不算bug。

查看ModelManager類下create_user函數類中的縮進,可能是user沒有返回數據的情況。 它將解決“NoneType”對象錯誤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM