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
This feedback was reported by Karen Braganza on DAG Factory 0.19.0:
Timetables that do not expect a params argument will result in the following import error.
Broken DAG: [/usr/local/airflow/dags/df.py]
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/dagfactory/dagbuilder.py", line 313, in make_timetable
schedule: Timetable = timetable_obj(**timetable_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: plugins.timetables.workday.UnevenIntervalsTimetable() argument after ** must be a mapping, not NoneType
In traditional Airflow, you can create a custom timetable with or without params like below.
schedule=UnevenIntervalsTimetable()
OR
schedule=CronTriggerTimetable("0 18 * * 5", timezone="UTC")
In DAG factory, only the second type of timetable will work.
The first timetable will produce the TypeError I mentioned because if the params dictionary is not available, the make_timetable() function in dagbuilder.py will receive a None value as the argument for its timetable_params parameter (source code).
Since it is expecting a dictionary, timetable_params is passed as **timetable_params to the timetable object within make_timetable(). If None is passed as **timetable_params instead of a dictionary, a TypeError is produced (source code).
My current workaround is to create a dummy argument in my custom timetable to pass in the params dictionary.
Users should be able to use custom timetables without params or a workaround.
The text was updated successfully, but these errors were encountered:
This feedback was reported by Karen Braganza on DAG Factory 0.19.0:
Timetables that do not expect a params argument will result in the following import error.
In traditional Airflow, you can create a custom timetable with or without params like below.
In DAG factory, only the second type of timetable will work.
The first timetable will produce the TypeError I mentioned because if the params dictionary is not available, the make_timetable() function in dagbuilder.py will receive a None value as the argument for its timetable_params parameter (source code).
Since it is expecting a dictionary, timetable_params is passed as **timetable_params to the timetable object within make_timetable(). If None is passed as **timetable_params instead of a dictionary, a TypeError is produced (source code).
My current workaround is to create a dummy argument in my custom timetable to pass in the params dictionary.
Users should be able to use custom timetables without params or a workaround.
The text was updated successfully, but these errors were encountered: