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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]