Thuy Tran
11/25/2022, 4:00 PM@task(cache_result_in_memory=False)
But I'm getting the error below that it's an unexpected keyword. Not sure what I'm doing wrong. It's running on prem using version 2.6.9.
Flow could not be retrieved from deployment.
Traceback (most recent call last):
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/opt/prefect/processor.py", line 3, in <module>
from data_import import data_import_process
File "/opt/prefect/data_import.py", line 8, in <module>
from data_cleaning import cleaning_process
File "/opt/prefect/data_cleaning.py", line 42, in <module>
@task(cache_result_in_memory=False)
TypeError: task() got an unexpected keyword argument 'cache_result_in_memory'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/conda/envs/prefect/lib/python3.10/site-packages/prefect/engine.py", line 256, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "/opt/conda/envs/prefect/lib/python3.10/site-packages/prefect/client.py", line 103, in with_injected_client
return await fn(*args, **kwargs)
File "/opt/conda/envs/prefect/lib/python3.10/site-packages/prefect/deployments.py", line 69, in load_flow_from_flow_run
flow = await run_sync_in_worker_thread(import_object, str(import_path))
File "/opt/conda/envs/prefect/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 57, in run_sync_in_worker_thread
return await anyio.to_thread.run_sync(call, cancellable=True)
File "/opt/conda/envs/prefect/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/opt/conda/envs/prefect/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/opt/conda/envs/prefect/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/opt/conda/envs/prefect/lib/python3.10/site-packages/prefect/utilities/importtools.py", line 193, in import_object
module = load_script_as_module(script_path)
File "/opt/conda/envs/prefect/lib/python3.10/site-packages/prefect/utilities/importtools.py", line 156, in load_script_as_module
raise ScriptError(user_exc=exc, path=path) from exc
prefect.exceptions.ScriptError: Script at 'processor.py' encountered an exception
Oscar Björhn
11/25/2022, 4:48 PMThuy Tran
11/25/2022, 4:57 PMOscar Björhn
11/25/2022, 5:01 PMThuy Tran
11/25/2022, 5:45 PMALWAYS
. The docker container pulls a custom image (which pulls the prefect image). But since that custom image existed on the server, it wasn't pulling the image that was updated to use the latest prefect version.Oscar Björhn
11/25/2022, 7:20 PM