atul-astronomer opened a new issue, #53984: URL: https://github.com/apache/airflow/issues/53984
### Apache Airflow version main (development) ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? <img width="1584" height="684" alt="Image" src="https://github.com/user-attachments/assets/a30776d1-39ed-49ae-add9-1c7dba1e32c3" /> ``` ERROR - Task failed with exception AirflowException: 'branch_task_ids' expected all task IDs are strings. Invalid tasks found: {(None, 'NoneType')}. File "/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py", line 918 in run File "/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py", line 1205 in _execute_task File "/opt/airflow/task-sdk/src/airflow/sdk/bases/operator.py", line 403 in wrapper File "/opt/airflow/providers/standard/src/airflow/providers/standard/operators/branch.py", line 102 in execute File "/opt/airflow/providers/standard/src/airflow/providers/standard/operators/branch.py", line 44 in do_branch File "/opt/airflow/providers/standard/src/airflow/providers/standard/utils/skipmixin.py", line 137 in skip_all_except ``` ### What you think should happen instead? _No response_ ### How to reproduce Run the below dag on main latest: ```python from datetime import timedelta from airflow.sdk import DAG from airflow.providers.standard.operators.empty import EmptyOperator from airflow.providers.standard.operators.python import BranchPythonOperator, PythonOperator default_args = { "owner": "airflow", "depends_on_past": False, "retries": 1, "retry_delay": timedelta(minutes=5), } def predestine(**kwargs): kwargs["ti"].xcom_push(key="choice", value="foo") def let_fates_decide(**kwargs): return kwargs["ti"].xcom_pull(key="choice") with DAG( dag_id="simple_branch", schedule=None, default_args=default_args, catchup=False, tags=["core"], ) as dag: ( PythonOperator(task_id="predestine", python_callable=predestine) >> BranchPythonOperator( task_id="let_fates_decide", python_callable=let_fates_decide, ) >> [EmptyOperator(task_id="foo"), EmptyOperator(task_id="bar")] ) ``` ### 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
