0
respostas

[Dúvida] Erro: exceptions Dagrun for TwitterTest not found

Ao tentar rodar o twitter_operator com o Airflow 2 recebo o seguinte erro

Traceback (most recent call last):
  File "/home/edinaldo/Documents/datapipeline/airflow/plugins/operators/twitter_operator.py", line 65, in <module>
    ti = TaskInstance(task=to, execution_date=datetime.now() - timedelta(days=1))
  File "<string>", line 4, in __init__
  File "/home/edinaldo/Documents/datapipeline/.env/lib/python3.10/site-packages/sqlalchemy/orm/state.py", line 481, in _initialize_instance
    with util.safe_reraise():
  File "/home/edinaldo/Documents/datapipeline/.env/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/home/edinaldo/Documents/datapipeline/.env/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 210, in raise_
    raise exception
  File "/home/edinaldo/Documents/datapipeline/.env/lib/python3.10/site-packages/sqlalchemy/orm/state.py", line 479, in _initialize_instance
    return manager.original_init(*mixed[1:], **kwargs)
  File "/home/edinaldo/Documents/datapipeline/.env/lib/python3.10/site-packages/airflow/models/taskinstance.py", line 570, in __init__
    raise DagRunNotFound(
airflow.exceptions.DagRunNotFound: DagRun for 'TwitterTest' with date 2022-11-20T11:32:17.171102+00:00 not found

Alguém consegue me ajudar, por favor?