我正在尝试使用AUTH_LDAP配置RBAC(设置Flask-AppBuilder的webserver_config.py
),并且在通过LDAP成功登录后,出现以下错误:
File "/usr/local/lib/python3.6/site-packages/airflow/www_rbac/templates/appbuilder/navbar_menu.html", line 47, in top-level template code
<li>{{ menu_item(item2) }}</li>
File "/usr/local/lib/python3.6/site-packages/jinja2/runtime.py", line 574, in _invoke
rv = self._func(*arguments)
File "/usr/local/lib/python3.6/site-packages/airflow/www_rbac/templates/appbuilder/navbar_menu.html", line 21, in template
<a tabindex="-1" href="{{item.get_url()}}">
File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/menu.py", line 24, in get_url
return url_for(f"{self.baseview.endpoint}.{self.baseview.default_view}")
File "/usr/local/lib/python3.6/site-packages/flask/helpers.py", line 370, in url_for
return appctx.app.handle_url_build_error(error, endpoint, values)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2215, in handle_url_build_error
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/helpers.py", line 358, in url_for
endpoint, values, method=method, force_external=external
File "/usr/local/lib/python3.6/site-packages/werkzeug/routing.py", line 2020, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.BuildError: Could not build url for endpoint 'BaseView.list'. Did you mean 'DagModelView.list' instead?
我正在使用werkzeug == 0.16.0的气流1.10.9。 请问您有什么提示吗?
谢谢。
答案 0 :(得分:1)
我了解了问题并解决了问题。
这与RBAC激活(在气流中)和以前的地雷插件有关,该插件尚未在插件视图中定义default_view = "index"
。