Alain Prasquier
07/08/2021, 3:37 PMFailed to load and execute Flow's environment: UnpicklingError("invalid load key, '{'."
I’ve read the Slack thread that referred this error: https://prefect-community.slack.com/archives/CL09KU1K7/p1623777537484700?thread_ts=1623704787.418000&cid=CL09KU1K7
which seems to point to version compatibility issues.
My setup :
• Agent Prefect version 0.15.0
• Running on Prefect Cloud (“core_version”: “0.14.22+9.g61192a3ee”)
• My task is a simple hello-world log, deployed with with Flow("s3_flow", storage=S3_STORAGE, run_config=ECSRun_CONFIG) as flow:
• is_serializable(flow) = True
Should I be downgrading my agent to match the server version ?
Any help will be very welcome !Kevin Kho
Alain Prasquier
07/08/2021, 3:39 PMKevin Kho
Kevin Kho
Alain Prasquier
07/08/2021, 3:41 PMprefect version I
0.15.0
Kevin Kho
prefect version
?Alain Prasquier
07/08/2021, 3:42 PMKevin Kho
Alain Prasquier
07/08/2021, 3:43 PMKevin Kho
Alain Prasquier
07/08/2021, 3:47 PMAlain Prasquier
07/08/2021, 3:47 PMimport prefect
from prefect.storage import S3
from prefect.run_configs import ECSRun
from prefect import task, Flow
from prefect.utilities.debug import is_serializable
TASK_ARN = "arn:aws:iam::1234567899:role/ECSTaskS3ECRRole"
RUN_CONFIG = ECSRun(labels=['s3-flow-storage','fargate-dev'], task_role_arn=TASK_ARN, image='anisienia/prefect-pydata', memory=512, cpu=256)
STORAGE = S3(bucket='etl-bucket')
@task
def say_hello():
logger = prefect.context.get("logger")
<http://logger.info|logger.info>("START SAY HELLO")
with Flow("s3_pandas", storage=STORAGE, run_config=RUN_CONFIG) as flow:
say_hello()
print(is_serializable(flow))
flow.register(project_name="etl-test")
Alain Prasquier
07/08/2021, 3:48 PMKevin Kho
Alain Prasquier
07/08/2021, 3:49 PMAlain Prasquier
07/08/2021, 3:50 PMAlain Prasquier
07/08/2021, 4:21 PMAlain Prasquier
07/08/2021, 4:21 PMKevin Kho
LocalRun
first instead of ECSRun
so we know it’s not ECS related? Storage can still be S3. Just do RUN_CONFIG = LocalRun()
first?Alain Prasquier
07/08/2021, 4:33 PM_pickle.UnpicklingError: invalid load key, '{'.
Alain Prasquier
07/08/2021, 4:33 PMAlain Prasquier
07/08/2021, 4:33 PMKevin Kho
Kevin Kho
Alain Prasquier
07/08/2021, 4:36 PMAlain Prasquier
07/08/2021, 4:44 PMAlain Prasquier
07/08/2021, 5:04 PMKevin Kho
Kevin Kho
prefecthq/prefect:latest-python3.8
will fix this I thinkKevin Kho