Nikola Lusic
04/29/2021, 12:53 PMFailed to load and execute Flow's environment: StorageError("An error occurred while unpickling the flow:\n TypeError('code() takes at most 15 arguments (16 given)')\n This may be due to one of the following version mismatches between the flow build and execution environments: \n - python: (flow build with '3.8.5', currently running with '3.7.10')")
I'm running prefect server, prefect agent and registration environment on 3 different Ubuntu machines, all running:
$ python3
Python 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import prefect
>>> prefect.__version__
'0.14.17'
>>> sys.version_info
sys.version_info(major=3, minor=8, micro=5, releaselevel='final', serial=0)
I don't understand where does the agent pick up the python 3.7.10 version, and why is the task executed with that environment (the python 3.7 is not even installed on the server nor agent environment).
Is there a way to set the python version on the execution environment, or am I missing something?Spencer
04/29/2021, 1:31 PMNikola Lusic
04/29/2021, 1:43 PMimport prefect
from prefect.storage import S3
from prefect import task, Flow
from prefect.run_configs import ECSRun
RUN_CONFIG = ECSRun(labels=['ecs-test'])
STORAGE = S3(bucket='prefect-data')
@task
def say_hello():
logger = prefect.context.get("logger")
<http://logger.info|logger.info>("Hello, ECS!")
with Flow("hello-flow", storage=STORAGE, run_config=RUN_CONFIG) as flow:
say_hello()
flow.register(project_name="test")
Nikola Lusic
04/29/2021, 1:44 PMrun_config
I'm not passing any images. Do you maybe know what image does it default to?Kevin Kho
Nikola Lusic
04/29/2021, 2:20 PMKevin Kho