You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ExternalPythonOperator: AttributeError: 'python_path' is configured as a template field but ExternalPythonOperator does not have this attribute.
#27232
Closed
2 tasks done
enisnazif opened this issue
Oct 24, 2022
· 0 comments
· Fixed by #27256
Apache Airflow version
Other Airflow 2 version (please specify below)
What happened
Using the ExternalPythonOperator directly in v2.4.2 as opposed to via the @task.external decorator described in https://airflow.apache.org/docs/apache-airflow/stable/howto/operator/python.html#externalpythonoperator causes the following error:
This seems to be due to https://github.com/apache/airflow/blob/main/airflow/operators/python.py#L624 having 'python_path' as an additional template field, instead of 'python', which is the correct additional keyword argument for the operator
What you think should happen instead
We should change https://github.com/apache/airflow/blob/main/airflow/operators/python.py#L624 to
read:
instead of
This has been verified by adding:
in the sample DAG code below, which causes the DAG to run successfully
How to reproduce
Operating System
Ubuntu 18.04
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: