nikkylesssy-star opened a new issue, #63982:
URL: https://github.com/apache/airflow/issues/63982

   ### Apache Airflow version
   
   3.1.8
   
   ### If "Other Airflow 3 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   Apache Airflow 3.1.8: Pages /users/list/ and /roles/list/ crash with:
   
   TypeError: super(type, obj): obj must be an instance or subtype of type
   
   Traceback points to: flask_appbuilder/fieldwidgets.py in BS3TextFieldWidget.
   
   Occurs on Airflow Web UI when visiting Users and Roles screens.
   (flask_appbuilder version bundled with 3.1.8?)
   
   
   
   Database state:
   – ab_user and ab_role tables contain valid records.
   
   Expected behaviour:
   UI displays list of users / roles without exception.
   
   Relevant logs and traceback are attached below.
   
   Please advise if this is a known issue or required patch?
   
   Environment:
   Airflow 3.1.8 (from Bitnami Helm)
   Python 3.x
   Flask AppBuilder integration.
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   Steps to reproduce:
   1. Install Airflow 3.1.8 (Helm/Bitnami or other)
   2. Log in as Admin
   3. Navigate to /users/list/ or /roles/list/
   4. See 500 error with TypeError
   
   
   ### Operating System
   
   k8s
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   
   TypeError: super(type, obj): obj must be an instance or subtype of type
   INFO:     172.22.48.113:59932 - "GET /auth/users/list/ HTTP/1.1" 500 
Internal Server Error
   INFO:     172.22.25.96:49750 - "GET 
/ui/dags?dag_runs_limit=14&limit=50&offset=0&exclude_stale=true&order_by=dag_display_name
 HTTP/1.1" 200 OK
   INFO:     172.22.25.96:49750 - "GET 
/api/v2/variables?limit=30&offset=0&order_by=key HTTP/1.1" 200 OK
   2026-03-20T10:31:22.490021Z [error    ] Exception on /roles/list/ [GET] 
[airflow.providers.fab.www.app] loc=app.py:1744
   Traceback (most recent call last):
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask/app.py", line 
2529, in wsgi_app
       response = self.full_dispatch_request()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask/app.py", line 
1825, in full_dispatch_request
       rv = self.handle_user_exception(e)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask/app.py", line 
1823, in full_dispatch_request
       rv = self.dispatch_request()
            ^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask/app.py", line 
1799, in dispatch_request
       return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/security/decorators.py",
 line 151, in wraps
       return f(self, *args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/views.py",
 line 205, in list
       return self.render_template(
              ^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/baseviews.py",
 line 346, in render_template
       return render_template(
              ^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask/templating.py", 
line 147, in render_template
       return _render(app, template, context)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask/templating.py", 
line 130, in _render
       rv = template.render(context)
            ^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/jinja2/environment.py", 
line 1295, in render
       self.environment.handle_exception()
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/jinja2/environment.py", 
line 942, in handle_exception
       raise rewrite_traceback_stack(source=source)
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/templates/appbuilder/general/model/list.html",
 line 2, in top-level template code
       {% import 'appbuilder/general/lib.html' as lib %}
       ^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/templates/appbuilder/base.html",
 line 1, in top-level template code
       {% extends base_template %}
       ^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/airflow/providers/fab/www/templates/airflow/main.html",
 line 21, in top-level template code
       {% from 'airflow/_messages.html' import show_message %}
       ^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/templates/appbuilder/baselayout.html",
 line 2, in top-level template code
       {% import 'appbuilder/baselib.html' as baselib %}
       ^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/templates/appbuilder/init.html",
 line 42, in top-level template code
       {% block body %}
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/templates/appbuilder/baselayout.html",
 line 19, in block 'body'
       {% block content %}
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/templates/appbuilder/general/model/list.html",
 line 7, in block 'content'
       {% block list_search scoped %}
       ^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/templates/appbuilder/general/model/list.html",
 line 8, in block 'list_search'
       {% call lib.accordion_tag("accordion1",_("Search"), False) %}
       ^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/jinja2/runtime.py", 
line 784, in _invoke
       rv = self._func(*arguments)
            ^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/templates/appbuilder/general/lib.html",
 line 304, in template
       {{ caller() }}
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/jinja2/runtime.py", 
line 784, in _invoke
       rv = self._func(*arguments)
            ^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/templates/appbuilder/general/model/list.html",
 line 9, in template
       {{ widgets.get('search')()|safe }}
       ^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/widgets.py",
 line 114, in __call__
       form_fields[col] = self.template_args["form"][col]()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/wtforms/fields/core.py",
 line 164, in __call__
       return self.meta.render_field(self, kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/wtforms/meta.py", line 
64, in render_field
       return field.widget(field, **render_kw)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File 
"/opt/bitnami/airflow/venv/lib/python3.12/site-packages/flask_appbuilder/fieldwidgets.py",
 line 68, in __call__
       return super(BS3TextFieldWidget, self).__call__(field, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   TypeError: super(type, obj): obj must be an instance or subtype of type
   INFO:     172.22.48.113:59932 - "GET /auth/roles/list/ HTTP/1.1" 500 
Internal Server Error
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to