Nate Lambeth
01/26/2021, 10:16 PMdef main():
# Schedule for every day @ 4AM ET / 9AM UTC
today = datetime.now(timezone.utc)
start = datetime(
int(today.year),
int(today.month),
int(today.day+1),
hour=int(START_TIME.hour),
minute=int(START_TIME.minute),
tzinfo=timezone.utc
)
schedule = IntervalClock(
start_date=start,
interval=timedelta(days=1),
)
with Flow(schedule=schedule):
.........
when i try to register this flow, i get the following:
<snip>
TypeError: not all arguments converted during string formatting
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "register_flows.py", line 7, in <module>
dev_flow.register()
File "/usr/local/bin/ddiqa-aws/ddiqa_aws/flows/dev_flow.py", line 234, in register
main()
File "/usr/local/bin/ddiqa-aws/ddiqa_aws/flows/dev_flow.py", line 227, in main
flow.register(
File "/home/nlambeth/.local/lib/python3.8/site-packages/prefect/core/flow.py", line 1668, in register
registered_flow = client.register(
File "/home/nlambeth/.local/lib/python3.8/site-packages/prefect/client/client.py", line 802, in register
raise ValueError(
ValueError: Flow could not be deserialized successfully. Error was: TypeError('not all arguments converted during string formatting')
this flow registers and runs 100% ok if i don't pass schedule
in to Flow(). i can't seem to find any relevant bug reports out there.Amanda Wee
01/26/2021, 10:22 PMCronSchedule
would be simpler?Nate Lambeth
01/26/2021, 10:24 PMschedule
to either a CronClock
or IntervalClock
schedule = Schedule(clocks=[etc])
before passing it into Flow. i'll leave this here for anyone that makes the same mistake!