themantalope opened a new issue, #36775:
URL: https://github.com/apache/airflow/issues/36775

   ### Apache Airflow version
   
   2.8.0
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   After declaring a `task.virtualenv` using a decorator and the TaskFlow API, 
the DAG has an import error:
   
   ```bash
   Broken DAG: [/opt/airflow/dags/<dag>.py] Traceback (most recent call last):
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/models/baseoperator.py",
 line 437, in apply_defaults
       result = func(self, **kwargs, default_args=default_args)
     File 
"/home/airflow/.local/lib/python3.8/site-packages/airflow/models/baseoperator.py",
 line 794, in __init__
       raise AirflowException(
   airflow.exceptions.AirflowException: Invalid arguments were passed to 
_PythonVirtualenvDecoratedOperator (task_id: <task name>). Invalid arguments 
were:
   **kwargs: {'venv_cache_path': '/opt/airflow/dags/venvs/'}
   ```
   
   ### What you think should happen instead?
   
   As best I can tell per the documentation, `venv_cache_path` should be a 
valid keyword argument for the virtualenv task decorator.
   
   ### How to reproduce
   
   Please try to define a task.virtualenv with a `venv_cache_path`.
   
   ### Operating System
   
   ```PRETTY_NAME="Debian GNU/Linux 11 (bullseye)" NAME="Debian GNU/Linux" 
VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=debian 
HOME_URL="https://www.debian.org/"; SUPPORT_URL="https://www.debian.org/support"; 
BUG_REPORT_URL="https://bugs.debian.org/"```
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### 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