RinSer opened a new issue, #43356: URL: https://github.com/apache/airflow/issues/43356
### Apache Airflow version 2.10.2 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? When I deploy docker image of webserver with latest WTForms version the UI for Connections and Variables management breaks with following error: ``` 2024-10-24 18:55:09 [2024-10-24T15:55:09.102+0000] {app.py:1744} ERROR - Exception on /variable/list/ [GET] 2024-10-24 18:55:09 Traceback (most recent call last): 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 2529, in wsgi_app 2024-10-24 18:55:09 response = self.full_dispatch_request() 2024-10-24 18:55:09 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1825, in full_dispatch_request 2024-10-24 18:55:09 rv = self.handle_user_exception(e) 2024-10-24 18:55:09 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1823, in full_dispatch_request 2024-10-24 18:55:09 rv = self.dispatch_request() 2024-10-24 18:55:09 ^^^^^^^^^^^^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1799, in dispatch_request 2024-10-24 18:55:09 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) 2024-10-24 18:55:09 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/flask_appbuilder/security/decorators.py", line 137, in wraps 2024-10-24 18:55:09 return f(self, *args, **kwargs) 2024-10-24 18:55:09 ^^^^^^^^^^^^^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/flask_appbuilder/views.py", line 550, in list 2024-10-24 18:55:09 widgets = self._list() 2024-10-24 18:55:09 ^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/flask_appbuilder/baseviews.py", line 1186, in _list 2024-10-24 18:55:09 form = self.search_form.refresh() 2024-10-24 18:55:09 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/flask_appbuilder/forms.py", line 327, in refresh 2024-10-24 18:55:09 form = self(obj=obj) 2024-10-24 18:55:09 ^^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/wtforms/form.py", line 209, in __call__ 2024-10-24 18:55:09 return type.__call__(cls, *args, **kwargs) 2024-10-24 18:55:09 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/flask_wtf/form.py", line 73, in __init__ 2024-10-24 18:55:09 super().__init__(formdata=formdata, **kwargs) 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/wtforms/form.py", line 281, in __init__ 2024-10-24 18:55:09 super().__init__(self._unbound_fields, meta=meta_obj, prefix=prefix) 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/wtforms/form.py", line 49, in __init__ 2024-10-24 18:55:09 field = meta.bind_field(self, unbound_field, options) 2024-10-24 18:55:09 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/wtforms/meta.py", line 28, in bind_field 2024-10-24 18:55:09 return unbound_field.bind(form=form, **options) 2024-10-24 18:55:09 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/wtforms/fields/core.py", line 387, in bind 2024-10-24 18:55:09 return self.field_class(*self.args, **kw) 2024-10-24 18:55:09 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-10-24 18:55:09 File "/usr/local/lib/python3.12/site-packages/wtforms/fields/core.py", line 133, in __init__ 2024-10-24 18:55:09 for k, v in flags.items(): 2024-10-24 18:55:09 ^^^^^^^^^^^ 2024-10-24 18:55:09 AttributeError: 'tuple' object has no attribute 'items' ``` Downgrading WTForms to 3.1.2 helps. Please consider restricting upper version of this dependency until the compatibility with Flask-WTF is fixed. ### What you think should happen instead? _No response_ ### How to reproduce Try to install 2.10.2 without restricting the WTForms lib. ### Operating System Debian GNU/Linux 12 (bookworm) ### Versions of Apache Airflow Providers _No response_ ### Deployment Other ### Deployment details _No response_ ### Anything else? _No response_ ### 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: commits-unsubscr...@airflow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org