https://prefect.io logo
i

itay livni

01/08/2021, 2:04 AM
Hi - I got an error message in Prefect Cloud
Failed to load and execute Flow's environment: SyntaxError("invalid or missing encoding declaration for '/home/.../MOC/etl_moc.py'")
-After the flow began and executed some tasks successfully. The flow was run locally. Is this a bug or something not configured correctly on my end? Thanks
c

Chris White

01/08/2021, 3:05 AM
Hi itay - it’s hard to say for sure, but this appears to be an issue with the Flow’s storage configuration. Could you share some reproducible code?
i

itay livni

01/08/2021, 3:09 AM
Reproducible flow code? As for storage this is the config
Copy code
etl_moc_flow.storage = Local(
    labels=["scrape-moc"],
    path="/home/itay/MOC/etl_moc.py",
)
c

Chris White

01/08/2021, 3:10 AM
gotcha, if you are storing your flow as a
.py
script you additionally need to specify
stored_as_script=True
i

itay livni

01/08/2021, 3:12 AM
Ok will try it --- But why did the same flow run fine yesterday? And why does it decide on this error in the middle or end of a script?
c

Chris White

01/08/2021, 3:15 AM
too many unknowns for me to say - something must have changed; also not sure what you mean by “middle or end of a script” - loading the flow’s environment is the first step in running the flow, which is when I would expect this error to get raised
i

itay livni

01/08/2021, 3:18 AM
Loading the flow’s environment is the first step in running the flow, which is when I would expect this error to get raised
I agree with that statement - what surprises me is that is happens on a terminal task or task with an upstream edge and downstream edge.
9 Views