'Apache Airflow 2.2.2 Upgrade - Dag Import Error - BashOperator - list index out of range
We recently upgraded our Airflow version to 2.2.2 from 1.10.3
We have several DAGs which use BashOperator to call another python script from the child folders. Looks like this.
- airflow
- dags
- project1
- scripts
- enrichment_1.py
- enrichment_1_dag.py
- project2
- scripts
- enrichment_2.py
- enrichment_2_dag.py
DAGs are using templated command to pass parameters to python script. DAGs are running fine.
Only 1 DAG displays below Broken DAG import error on UI. Can't get rid of this error. Any suggestions?
Broken DAG: [/usr/local/airflow/dags/project1/scripts/enrichment_1.py] Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/local/airflow/dags/project1/scripts/enrichment_1.py", line 36, in <module>
bucket_name = sys.argv[2] #'some-bucket-name'
IndexError: list index out of range
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
