添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
痴情的签字笔  ·  提示bash: warning: ...·  5 月前    · 
大力的烤面包  ·  MFC控件的Z序_mfc ...·  12 月前    · 
害羞的饭卡  ·  Error trying to run ...·  1 年前    · 
道上混的紫菜汤  ·  While executing gem ...·  1 年前    · 

I been trying to import DAGs into airflow but the same error is appearing in all the DAGs

Screen Shot 2022-02-08 at 10.41.26 AM 1019×458 83.7 KB

Has anybody had the same issue? I only use dates in the scheduler parameters

Example:

DEFAULT_ARGS = {
“owner”: “airflow”,
“depends_on_past”: False,
“email”: [“ [email protected] ”],
“start_date”: pendulum.datetime(year=2020, month=8, day=20),
“email_on_failure”: False,
“email_on_retry”: False,
Begin DAG logic

dag = DAG(
DAG_ID,
default_args=DEFAULT_ARGS,
dagrun_timeout=timedelta(hours=3),
schedule_interval=None,
max_active_runs=1,

My first guess is that start_date requires a datetime object, not the Pendulum datetime object.

You may try to convert it to a datetime object first.

from datetime import datetime
p = pendulum.datetime(year=2020, month=8, day=20)
start_date = datetime.fromisoformat(p.to_datetime_string())
DEFAULT_ARGS = {
    "start_date": start_date,

Alternatively, we can try timezone in the airflow.utils module:

from airflow.utils import timezone
DEFAULT_ARGS = {
    "start_date": timezone.datetime(2020, 8, 20),