0

我正在尝试webserver_config.py使用 AUTH_LDAP 配置 RBAC(设置 Flask-AppBuilder),并且在通过 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。请问您有什么提示吗?

先感谢您。

4

1 回答 1

1

我理解了问题并解决了问题。

它与 RBAC 激活(在气流中)和以前的地雷插件有关,插件视图中没有default_view = "index"定义。

于 2020-03-17T12:05:19.837 回答