atul-astronomer opened a new issue, #48621:
URL: https://github.com/apache/airflow/issues/48621

   ### Apache Airflow version
   
   main (development)
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   [2025-04-01, 11:25:53] ERROR - Top level error: source="task"
   TypeError: 'NoneType' object is not iterable
   File "/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py", 
line 1056 in main
   
   File "/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py", 
line 1016 in finalize
   
   File "/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py", 
line 864 in _run_task_state_change_callbacks
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   Run the below Dag:
   
   ```python
   with DAG(
       dag_id="expand_kwargs_mod_tf",
       doc_md="use expand_kwargs with a mapper function and the taskflow 
interface",
       schedule=timedelta(days=30 * 365),
       start_date=datetime(1970, 1, 1),
       tags=["taskmap"]
   ) as expand_kwargs_mod_tf:
   
       @task
       def data():
           return [
               ("hello {}", "foo"),
               ("goodbye {}", "bar"),
           ]
   
       def mapper(entry):
           print("ENTRY: ", entry)
           if entry[1] != "bar":
               return {"template": entry[0], "user": entry[1]}
           else:
               raise AirflowSkipException("no entry for foo")
   
       @task(task_id="one_task")
       def printer(template, user):
           print(template.format(user))
   
       printer.expand_kwargs(data().map(mapper))
   ``` 
   
   ### 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]

Reply via email to