Felix-neko opened a new issue, #50752: URL: https://github.com/apache/airflow/issues/50752
### Apache Airflow version 3.0.1 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? Hi folks! And thank you for your great product. I want to run some `PythonVirtualenvOperator` that has `pendulum<3` in its requirements. And I'm getting the following error: ``` [2025-05-18T22:12:54.135+0300] {process_utils.py:196} INFO - obj = StockUnpickler.load(self) [2025-05-18T22:12:54.135+0300] {process_utils.py:196} INFO - AttributeError: type object 'Timezone' has no attribute '_unpickle' ``` ### What you think should happen instead? _No response_ ### How to reproduce Here's a a complete script to reproduce the error: ``` from datetime import datetime, timedelta import pendulum from airflow import DAG from airflow.providers.standard.operators.python import PythonOperator, PythonVirtualenvOperator # Define the DAG with DAG(dag_id="example_virtualenv_dag", start_date=datetime(2025, 5, 1), schedule=None, catchup=False) as dag: # A simple Python callable to be run in the virtualenv def generate_message(*args, **kwargs): return "Hello from virtualenv!" # Task: runs `generate_message` inside a fresh virtual environment virtualenv_task = PythonVirtualenvOperator( task_id="virtualenv_task", python_version="3.9", python_callable=generate_message, requirements=[ "pendulum<3" ], # This will cause an error: AttributeError: type object 'Timezone' has no attribute '_unpickle' system_site_packages=False, expect_airflow=False, serializer="dill", ) if __name__ == "__main__": dag_run = dag.test( logical_date=pendulum.datetime(2025, 5, 3) ) # Runs all tasks locally without a scheduler :contentReference[oaicite:2]{index=2} print("STATE: ", dag_run.state) ``` ### Operating System Ubuntu 24.04 ### Versions of Apache Airflow Providers apache-airflow-providers-common-compat==1.7.0 apache-airflow-providers-common-io==1.6.0 apache-airflow-providers-common-sql==1.27.1 apache-airflow-providers-smtp==2.1.0 apache-airflow-providers-standard==1.2.0 ### Deployment Official Apache Airflow Helm Chart ### 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