epoch8 / airflow-exporter

Airflow plugin to export dag and task based metrics to Prometheus.
Other
240 stars 75 forks source link

Fix import error for dummy operator #39

Closed msumit closed 5 years ago

msumit commented 5 years ago

To fix below error


[2018-12-17 18:20:02,048] {plugins_manager.py:100} ERROR - cannot import name 'DummyOperator'
Traceback (most recent call last):
  File "/Users/sumitm/work/incubator-airflow/airflow/plugins_manager.py", line 89, in <module>
    m = imp.load_source(namespace, filepath)
  File "/Users/sumitm/work/incubator-airflow/venv3/lib/python3.6/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/sumitm/airflow/plugins/prometheus_exporter/tests/dags/dummy_dag.py", line 3, in <module>
    from airflow.operators import DummyOperator
ImportError: cannot import name 'DummyOperator'```
elephantum commented 5 years ago

Interesting that this test is passing. Do you use development Airflow branch?

msumit commented 5 years ago

@elephantum no it was even failing for me on Airflow 1.8.2 and python 2.7 as well.