@prefect.task()
def get_backfill_or_scheduled_date():
time = prefect.context.get("backfill_time") or prefect.context.get("scheduled_start_time")
print(time)
print(type(time))
However I see that this task creates a pod in kubernetes with the image
prefecthq/prefect:0.15.12
, is there a way that I can specify the python version for this image? The mismatch between the build and run environment is causing an error
Samay Kapadia
03/21/2022, 4:08 PM
The error that I see is
Copy code
Failed to load and execute Flow's environment: FlowStorageError("An error occurred while unpickling the flow:\n TypeError('code() takes at most 15 arguments (16 given)')\nThis may be due to one of the following version mismatches between the flow build and execution environments:\n - python: (flow built with '3.8.12', currently running with '3.7.12')")
And I’ve confirmed the prefect version is 0.15.12 in both places
k
Kevin Kho
03/21/2022, 4:08 PM
Hi @Samay Kapadia, it shouldn’t be this task that is defining the image. Are you using
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.