matteosdocsity opened a new issue, #43375:
URL: https://github.com/apache/airflow/issues/43375

   ### Apache Airflow version
   
   2.10.2
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   After re-creating the containers of both Airflow 2.10.2, Postgres 15.4, and 
Python 3.12, without any changes from previous configurations, I encountered an 
error when trying to access the Variables UI Panel.
   
   ```python
   airflow-1  | [2024-10-25T07:07:01.991+0000] {app.py:1744} ERROR - Exception 
on /variable/list/ [GET]
   airflow-1  | Traceback (most recent call last):
   airflow-1  |   File "/usr/local/lib/python3.12/site-packages/flask/app.py", 
line 2529, in wsgi_app
   airflow-1  |     response = self.full_dispatch_request()
   airflow-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-1  |   File "/usr/local/lib/python3.12/site-packages/flask/app.py", 
line 1825, in full_dispatch_request
   airflow-1  |     rv = self.handle_user_exception(e)
   airflow-1  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-1  |   File "/usr/local/lib/python3.12/site-packages/flask/app.py", 
line 1823, in full_dispatch_request
   airflow-1  |     rv = self.dispatch_request()
   airflow-1  |          ^^^^^^^^^^^^^^^^^^^^^^^
   airflow-1  |   File "/usr/local/lib/python3.12/site-packages/flask/app.py", 
line 1799, in dispatch_request
   airflow-1  |     return 
self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
   airflow-1  |            
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-1  |   File 
"/usr/local/lib/python3.12/site-packages/flask_appbuilder/security/decorators.py",
 line 137, in wraps
   airflow-1  |     return f(self, *args, **kwargs)
   airflow-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-1  |   File 
"/usr/local/lib/python3.12/site-packages/flask_appbuilder/views.py", line 550, 
in list
   airflow-1  |     widgets = self._list()
   airflow-1  |               ^^^^^^^^^^^^
   airflow-1  |   File 
"/usr/local/lib/python3.12/site-packages/flask_appbuilder/baseviews.py", line 
1186, in _list
   airflow-1  |     form = self.search_form.refresh()
   airflow-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-1  |   File 
"/usr/local/lib/python3.12/site-packages/flask_appbuilder/forms.py", line 327, 
in refresh
   airflow-1  |     form = self(obj=obj)
   airflow-1  |            ^^^^^^^^^^^^^
   airflow-1  |   File 
"/usr/local/lib/python3.12/site-packages/wtforms/form.py", line 209, in __call__
   airflow-1  |     return type.__call__(cls, *args, **kwargs)
   airflow-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-1  |   File 
"/usr/local/lib/python3.12/site-packages/flask_wtf/form.py", line 73, in 
__init__
   airflow-1  |     super().__init__(formdata=formdata, **kwargs)
   airflow-1  |   File 
"/usr/local/lib/python3.12/site-packages/wtforms/form.py", line 281, in __init__
   airflow-1  |     super().__init__(self._unbound_fields, meta=meta_obj, 
prefix=prefix)
   airflow-1  |   File 
"/usr/local/lib/python3.12/site-packages/wtforms/form.py", line 49, in __init__
   airflow-1  |     field = meta.bind_field(self, unbound_field, options)
   airflow-1  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-1  |   File 
"/usr/local/lib/python3.12/site-packages/wtforms/meta.py", line 28, in 
bind_field
   airflow-1  |     return unbound_field.bind(form=form, **options)
   airflow-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-1  |   File 
"/usr/local/lib/python3.12/site-packages/wtforms/fields/core.py", line 387, in 
bind
   airflow-1  |     return self.field_class(*self.args, **kw)
   airflow-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   airflow-1  |   File 
"/usr/local/lib/python3.12/site-packages/wtforms/fields/core.py", line 133, in 
__init__
   airflow-1  |     for k, v in flags.items():
   airflow-1  |                 ^^^^^^^^^^^
   airflow-1  | AttributeError: 'tuple' object has no attribute 'items'
   
   ```
   
   ### What you think should happen instead?
   
   Accessing correctly to any airflow panel
   
   ### How to reproduce
   
   Re-create containers for Airflow 2.10.2, Postgres 15.4, and Python 3.12.
   Attempt to access the Variables UI Panel.
   Observe the error.
   
   
   ### Operating System
   
   PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" 
VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian 
HOME_URL="https://www.debian.org/"; SUPPORT_URL="https://www.debian.org/support"; 
BUG_REPORT_URL="https://bugs.debian.org/";
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-amazon==9.0.0
   apache-airflow-providers-common-compat==1.2.1
   apache-airflow-providers-common-io==1.4.2
   apache-airflow-providers-common-sql==1.18.0
   apache-airflow-providers-fab==1.4.1
   apache-airflow-providers-facebook==3.6.0
   apache-airflow-providers-ftp==3.11.1
   apache-airflow-providers-google==10.23.0
   apache-airflow-providers-http==4.13.1
   apache-airflow-providers-imap==3.7.0
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   Here is the docker-compose.yml
   ```docker-compose
   services:
     postgres:
       platform: linux/arm64
       image: postgres:15.4
       restart: unless-stopped
       environment:
         - POSTGRES_USER=airflow
         - POSTGRES_PASSWORD=airflow
         - POSTGRES_DB=airflow
       volumes:
         - "pgsql-data:/var/lib/postgresql/data"
       ports:
         - "5432:5432"
     airflow:
       platform: linux/arm64
       build:
         context: .
         dockerfile: ./src/airflow/Dockerfile
       restart: unless-stopped
       depends_on:
         - postgres
       environment:
         - EXECUTOR=Local
         - AIRFLOW__CORE__FERNET_KEY=***
         - AIRFLOW__WEBSERVER__WORKERS=4
         - AIRFLOW__WEBSERVER__BASE_URL=http://localhost:8080
         - GOOGLE_APPLICATION_CREDENTIALS=***
       volumes:
         - ./src/dags:/usr/local/airflow/dags
         - ./src/utils:/usr/local/airflow/utils
         - ./confs:/usr/local/airflow/confs
         - ./src/airflow:/usr/local/airflow
       env_file:
         - ./.env    
       ports:
         - "8080:8080"
       command: webserver
       healthcheck:
         test: ["CMD-SHELL", "[ -f /usr/local/airflow/airflow-webserver.pid ]"]
         interval: 30s
         timeout: 30s
         retries: 3
   
   volumes:
     pgsql-data:
       driver: local
   
   
   ```
   
   ### 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: [email protected]

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

Reply via email to