atul-astronomer opened a new issue, #53018: URL: https://github.com/apache/airflow/issues/53018
### Apache Airflow version 3.0.2 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? [2025-07-08, 05:56:02] INFO - TaskInstance Details: : dag_id="native_obj_false": task_id="check_xcoms": dagrun_id="manual__2025-07-08T05:56:00.363026+00:00": map_index=-1: run_start_date="2025-07-08T05:56:02.042281Z": try_number=1: op_classpath=["airflow.providers.standard.operators.python.PythonOperator","airflow.models.baseoperator.BaseOperator"]: source="task" [2025-07-08, 05:56:02] INFO - This is the datatype for the pulled xcom value: <class 'dict'>: chan="stdout": source="task" [2025-07-08, 05:56:02] ERROR - Task failed with exception: source="task" KeyError: 0 File "/usr/local/lib/python3.12/site-packages/airflow/sdk/execution_time/task_runner.py", line 855 in run File "/usr/local/lib/python3.12/site-packages/airflow/sdk/execution_time/task_runner.py", line 1142 in _execute_task File "/usr/local/lib/python3.12/site-packages/airflow/sdk/bases/operator.py", line 397 in wrapper File "/usr/local/lib/python3.12/site-packages/airflow/providers/standard/operators/python.py", line 217 in execute File "/usr/local/lib/python3.12/site-packages/airflow/providers/standard/operators/python.py", line 240 in execute_callable File "/usr/local/lib/python3.12/site-packages/airflow/sdk/execution_time/callback_runner.py", line 81 in run File "/usr/local/airflow/dags/render_template_as_native_object_false.py", line 18 in check_type ### What you think should happen instead? _No response_ ### How to reproduce Use the below Dag to reproduce the issue: ```python from airflow.sdk import DAG from airflow.providers.standard.operators.python import PythonOperator from datetime import datetime, timedelta twos_day = datetime.now() - timedelta(days=2) def native_obj_false(x, y): return x, y def check_type(**context): ti = context["ti"] pulled_value = ti.xcom_pull( task_ids="py_native_obj_false", key="return_value" ) print(f"This is the datatype for the pulled xcom value: {type(pulled_value)}") print(f"This is datatype for the 0th index of the xcom value: {type(pulled_value[0])}") print(f"This is datatype for the 1st index of the xcom value: {type(pulled_value[0])}") assert type(pulled_value[0]) == str and type(pulled_value[1]) == str default_args = {"owner": "airflow", "depends_on_past": True} with DAG( dag_id="native_obj_false", start_date=twos_day, schedule=None, # when set to false only the __str__() method is returned render_template_as_native_obj=False, tags=["core", "negative"], user_defined_macros={ "says_hi": "Hello World!", "the_planets": [ "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Neptune", ], "ints": [1, 2, 3, 4, 5], }, ) as dag: t1 = PythonOperator( task_id="py_native_obj_false", python_callable=native_obj_false, op_args=["{{ says_hi }}", "{{ ints }}"], ) t2 = PythonOperator( task_id="check_xcoms", python_callable=check_type, ) t1 >> t2 ``` ### Operating System Linux ### 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