You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/28 19:40:58 UTC
[GitHub] [airflow] ephraimbuddy commented on issue #20974: Can't pass in **context kwarg to the PythonVirtualenvOperator's python_callable
ephraimbuddy commented on issue #20974:
URL: https://github.com/apache/airflow/issues/20974#issuecomment-1024571244
@uranusjr I think there's a related bug or maybe the same bug but a different error.
When you set `system_site_packages=True`, `use_dill=True`, and ` **context` on the function, it gives error. Though not like we have on this issue but looks related because if you set use_dill=False it gives exactly the same error as we see here.
```python
from airflow.models import DAG
from airflow.operators.python import PythonVirtualenvOperator, PythonOperator
from airflow.utils.dates import days_ago
def test_venv_func(**kwargs):
print(kwargs)
pass
with DAG(
dag_id="venv_op_not_accepting_context_kwarg",
schedule_interval=None,
start_date=days_ago(2),
) as dag:
test = PythonVirtualenvOperator(
task_id="test",
python_callable=test_venv_func,
system_site_packages=True,
use_dill=True
)
```
--
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-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org