sbialkowski-pixel opened a new issue #19016:
URL: https://github.com/apache/airflow/issues/19016


   ### Apache Airflow version
   
   2.2.0 (latest released)
   
   ### Operating System
   
   Linux
   
   ### Versions of Apache Airflow Providers
   
   Default
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   Official docker-compose with some custom env. 
   
   ### What happened
   
   Any search done in UI on Xcoms value fail in to error. 
   This bug is also in version 2.1.2 so 2.1.4 probably also contain it.
   In xcoms I have plan text produced by KuberentesPodOperator like pod name 
and standard json string returned from operators in _return_value_ key. Nothing 
sophisticated. 
   
   This is url being executed:
   `myairflow.com/xcom/list/?_flt_0_value=proceed`
   
   And result:
   ```
   Python version: 3.7.12
   Airflow version: 2.2.0
   Node: 325e0f34a3cc
   
-------------------------------------------------------------------------------
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 
2447, in wsgi_app
       response = self.full_dispatch_request()
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 
1952, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 
1821, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/_compat.py", 
line 39, in reraise
       raise value
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 
1950, in full_dispatch_request
       rv = self.dispatch_request()
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 
1936, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File 
"/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py",
 line 109, in wraps
       return f(self, *args, **kwargs)
     File 
"/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/views.py", 
line 554, in list
       widgets = self._list()
     File 
"/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/baseviews.py",
 line 1134, in _list
       page_size=page_size,
     File 
"/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/baseviews.py",
 line 1033, in _get_list_widget
       page_size=page_size,
     File 
"/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py",
 line 425, in query
       count = self.query_count(query, filters, select_columns)
     File 
"/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py",
 line 347, in query_count
       query, filters, select_columns=select_columns, aliases_mapping={}
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", 
line 3803, in count
       return self.from_self(col).scalar()
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", 
line 3523, in scalar
       ret = self.one()
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", 
line 3490, in one
       ret = self.one_or_none()
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", 
line 3459, in one_or_none
       ret = list(self)
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", 
line 3535, in __iter__
       return self._execute_and_instances(context)
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/query.py", 
line 3560, in _execute_and_instances
       result = conn.execute(querycontext.statement, self._params)
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", 
line 1011, in execute
       return meth(self, multiparams, params)
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", 
line 298, in _execute_on_connection
       return connection._execute_clauseelement(self, multiparams, params)
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", 
line 1130, in _execute_clauseelement
       distilled_params,
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", 
line 1317, in _execute_context
       e, statement, parameters, cursor, context
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", 
line 1514, in _handle_dbapi_exception
       util.raise_(exc_info[1], with_traceback=exc_info[2])
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", 
line 182, in raise_
       raise exception
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", 
line 1277, in _execute_context
       cursor, statement, parameters, context
     File 
"/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/default.py",
 line 608, in do_execute
       cursor.execute(statement, parameters)
   TypeError: can't escape str to binary
   ```
   
   ### What you expected to happen
   
   Properly filtered Xcoms entries in UI
   
   ### How to reproduce
   
   Just any airflow 2.1.2, 2.1.4 or 2.2.0 with any xcom in db.
   
   ### 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