jablecherman commented on issue #48554:
URL: https://github.com/apache/airflow/issues/48554#issuecomment-2919518648

   > I faced the same ImportError trying to evaluate 
`LazyXComSequence(<unevaluated length>)` in the reduce function during dynamic 
task mapping. Running with `dag.test()`, LocalExecutor, Airflow 3.0.1.
   > 
   > # Reduce function
   > @task
   > def send_notifications(data_to_notificate: list[tuple[Rule, 
ObjectStoragePath]], **context) -> None:
   >     for rule, input_file in data_to_notificate: # The error raises here
   >         ...
   > UPD: the same parameter is identified as `LazySelectSequence([4 items])` 
in Airflow 2.11.0, and the DAG works properly.
   
   
   Seconding the `dag.test()` note (apologies for non-task flow syntax)
   
   ```
   from airflow.models.dag import DAG
   from airflow.providers.standard.operators.python import PythonOperator
   from airflow.sdk.definitions.connection import Connection
   
   MSSQL_CONN_ID = "test_conn_id"
   
   with DAG(
       dag_id="test_dag",
       catchup=False,
   ) as dag:
       PythonOperator(
           task_id = "foo",
           python_callable=Connection.get,
           op_args=[MSSQL_CONN_ID]
       )
   
   if __name__ == "__main__":
       dag.test()
   
   ```
   
   Running this DAG via dag.test() results in this error, running normally (via 
UI) is fine.


-- 
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