Sebastian Gay
03/03/2023, 12:52 PM03 13:24:50 File "/usr/local/lib/python3.7/site-packages/prefect/engine.py", line 246, in retrieve_flow_then_begin_flow_run
2023-03-03 13:24:50 flow = await load_flow_from_flow_run(flow_run, client=client)
2023-03-03 13:24:50 File "/usr/local/lib/python3.7/site-packages/prefect/client.py", line 105, in with_injected_client
2023-03-03 13:24:50 return await fn(*args, **kwargs)
2023-03-03 13:24:50 File "/usr/local/lib/python3.7/site-packages/prefect/deployments.py", line 73, in load_flow_from_flow_run
2023-03-03 13:24:50 flow = await run_sync_in_worker_thread(import_object, str(import_path))
2023-03-03 13:24:50 File "/usr/local/lib/python3.7/site-packages/prefect/utilities/asyncutils.py", line 56, in run_sync_in_worker_thread
2023-03-03 13:24:50 return await anyio.to_thread.run_sync(call, cancellable=True)
2023-03-03 13:24:50 File "/usr/local/lib/python3.7/site-packages/anyio/to_thread.py", line 32, in run_sync
2023-03-03 13:24:50 func, *args, cancellable=cancellable, limiter=limiter
2023-03-03 13:24:50 File "/usr/local/lib/python3.7/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
2023-03-03 13:24:50 return await future
2023-03-03 13:24:50 File "/usr/local/lib/python3.7/site-packages/anyio/_backends/_asyncio.py", line 867, in run
2023-03-03 13:24:50 result = context.run(func, *args)
2023-03-03 13:24:50 File "/usr/local/lib/python3.7/site-packages/prefect/utilities/importtools.py", line 193, in import_object
2023-03-03 13:24:50 module = load_script_as_module(script_path)
2023-03-03 13:24:50 File "/usr/local/lib/python3.7/site-packages/prefect/utilities/importtools.py", line 156, in load_script_as_module
2023-03-03 13:24:50 raise ScriptError(user_exc=exc, path=path) from exc
2023-03-03 13:24:50 prefect.exceptions.ScriptError: Script at '<Flow script location on local machine>' encountered an exception
This seems related to this issue however as I am running prefect 2.1.0 DockerFlowRunner
has been deprecated. I tried the COPY $FLOWSCRIPT.py .
before building the docker image as well but it didn't help, and isn't a solution that will work for me. The link in there to the s3 with volume parameters for the credentials also doesn't seem relevant, as I have already loaded and authorised the storage block using SAS.
The same issue occurs even when I deploy using the CLI according to the prompt in the second to last row of this table.
Could someone please help me to get the docker container to look for the flow script in the storage block where it is successfully uploaded on deployment, not the path of the flow script on the machine that initiates the deployment?Sebastian Gay
03/03/2023, 1:25 PMChristopher Boyd
03/03/2023, 1:45 PM2.1.0
?Sebastian Gay
03/03/2023, 1:48 PMChristopher Boyd
03/03/2023, 2:20 PM2.8.4
- https://github.com/PrefectHQ/prefect/releasesSebastian Gay
03/03/2023, 2:22 PMChristopher Boyd
03/03/2023, 2:53 PMChristopher Boyd
03/03/2023, 2:56 PM