<@ULVA73B9P> I am getting Import name "TaskRunInp...
# ask-marvin
l
@Marvin I am getting Import name "TaskRunInput" when I run the deployment on Prefect managed(cloud) environment but it works local deployment
m
thought for 238.7 seconds
This looks like a version mismatch / renamed import issue between your local environment and the Prefect-managed runtime in Cloud. What’s happening
TaskRunInput
was renamed to
RunInput
in newer Prefect 3.x code. If your deployment runs in a managed Cloud environment with a different Prefect version than your local machine, code that still imports
TaskRunInput
can work locally but fail remotely. So if you have something like:
Copy code
python
from prefect.client.schemas import TaskRunInput
that is the likely cause. Fix Update the import to:
Copy code
python
from prefect.client.schemas import RunInput
If you need a temporary compatibility shim:
Copy code
python
from prefect.client.schemas.objects import RunInput

TaskRunInput = RunInput
Why only in Cloud? Your local environment and the Cloud managed execution image are probably using different Prefect versions. Common pattern: - Local: older or matching version where your code still works - Cloud managed runtime: newer Prefect image where
TaskRunInput
is no longer exported correctly What to check next 1. Search your codebase for
TaskRunInput
2. Replace it with
RunInput
3. Make sure your deployment runtime uses the same Prefect version as local If you’re deploying with a custom image, pin the Prefect version explicitly there. If you’re using managed execution, make sure your dependencies/runtime are aligned with local development. Recommendation Pin Prefect to the same version locally and remotely rather than relying on a floating/latest runtime. If you want, I can help you with either: - finding the exact import to change, or - showing how to pin the Prefect version for your deployment setup Relevant docs: - Deploy via Python - prefect.yaml deployments - Work pools / execution basics If you paste the full traceback and your deployment method (
prefect.yaml
,
flow.deploy(...)
, managed work pool type, etc.), I can narrow it down quickly.
l
Full error below @Marvin
Encountered exception during execution: ImportError("cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)")
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1288, in run_context
display_state = (
^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2036, in run_flow_sync
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1308, in call_flow_fn
async def start(self) -> AsyncGenerator[None, None]:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/utilities/callables/__init__.py", line 348, in call_with_parameters
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/opt/prefect/oris_codebase/scheduled_daily_update.py", line 348, in export_db
query_results = extract_data(db_and_queries, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/tasks.py", line 1225, in __call__
raise VisualizationUnsupportedError(
File "/usr/local/lib/python3.12/site-packages/prefect/task_engine.py", line 40, in <module>
from prefect.client.schemas.objects import State, TaskRunInput
ImportError: cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)
Finished in state Failed("Flow run encountered an exception: ImportError: cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)")
Engine execution exited with unexpected exception
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2193, in run_flow
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2038, in run_flow_sync
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 768, in result
self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1288, in run_context
display_state = (
^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2036, in run_flow_sync
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1308, in call_flow_fn
async def start(self) -> AsyncGenerator[None, None]:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/utilities/callables/__init__.py", line 348, in call_with_parameters
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/opt/prefect/oris_codebase/scheduled_daily_update.py", line 348, in export_db
query_results = extract_data(db_and_queries, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/tasks.py", line 1225, in __call__
raise VisualizationUnsupportedError(
File "/usr/local/lib/python3.12/site-packages/prefect/task_engine.py", line 40, in <module>
from prefect.client.schemas.objects import State, TaskRunInput
ImportError: cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)
End of logs
.Yaml
# Welcome to your prefect.yaml file! You can use this file for storing and managing
# configuration for deploying your flows. We recommend committing this file to source
# control along with your flow code.
# Generic metadata about this project
name: prefect
prefect-version: 3.1.6
# build section allows you to manage and build docker images
build: null
# push section allows you to manage if and how this project is uploaded to remote locations
push: null
# pull section allows you to provide instructions for cloning this project in remote locations
pull:
# pull from local directory
# - prefect.deployments.steps.set_working_directory:
#     directory:  /Users/lawalidris/oris_codebase
# - prefect.deployments.steps.pip_install_requirements:
#     directory:  /Users/lawalidris/oris_codebase
#     requirements_file: requirements.txt
# pull from github repo
- prefect.deployments.steps.git_clone:
id: clone-step
repository: <https://github.com/drisAloma/oris_codebase.git>
# If the repo is private, use one of these:
# access_token: "{{ prefect.blocks.secret.prefect-github-access-token }}"
credentials: "{{ prefect.blocks.github-credentials.github-creds }}"
- prefect.deployments.steps.pip_install_requirements:
directory: "{{ clone-step.directory }}"
requirements_file: requirements.txt
# the deployments section allows you to provide configuration for deploying flows
deployments:
- name: local_test_etl
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: hello.py:hello_world
parameters: {name : idris}
work_pool:
name: local-work-pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
- name: cloud_test_etl
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: hello.py:my_workflow
parameters: {}
work_pool:
name: cloud_pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
- name: oris_daily_update
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: scheduled_daily_update.py:export_db
parameters: {}
work_pool:
# name: local-work-pool
name: cloud_pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
- name: oris_etl
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: etl_to_gs_mod.py:export_db
work_pool:
name: cloud_pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
Deployment in the txt file
m
Your message was too long, here's your message at the allowed limit: Full error below
Encountered exception during execution ImportError( cannot import name 'TaskRunInput' from 'prefect client schemas objects' (/usr/local/lib/python3 12/site-packages/prefect/client/schemas/objects py) )
Traceback (most recent call last)
File /usr/local/lib/python3 12/site-packages/prefect/flow_engine py line 1288 in run_context
display_state = (
^^^^^^^^^^
File /usr/local/lib/python3 12/site-packages/prefect/flow_engine py line 2036 in run_flow_sync
File /usr/local/lib/python3 12/site-packages/prefect/flow_engine py line 1308 in call_flow_fn
async def start(self) -> AsyncGenerator[None None]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File /usr/local/lib/python3 12/site-packages/prefect/utilities/callables/__init__ py line 348 in call_with_parameters
return fn(*args *kwargs)
^^^^^^^^^^^^^^^^^^^
File /opt/prefect/oris_codebase/scheduled_daily_update py line 348 in export_db
query_results = extract_data(db_and_queries config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File /usr/local/lib/python3 12/site-packages/prefect/tasks py line 1225 in __call__
raise VisualizationUnsupportedError(
File /usr/local/lib/python3 12/site-packages/prefect/task_engine py line 40 in <module>
from prefect client schemas objects import State TaskRunInput
ImportError cannot import name 'TaskRunInput' from 'prefect client schemas objects' (/usr/local/lib/python3 12/site-packages/prefect/client/schemas/objects py)
Finished in state Failed( Flow run encountered an exception ImportError cannot import name 'TaskRunInput' from 'prefect client schemas objects' (/usr/local/lib/python3 12/site-packages/prefect/client/schemas/objects py) )
Engine execution exited with unexpected exception
Traceback (most recent call last)
File /usr/local/lib/python3 12/site-packages/prefect/flow_engine py line 2193 in run_flow
File /usr/local/lib/python3 12/site-packages/prefect/flow_engine py line 2038 in run_flow_sync
File /usr/local/lib/python3 12/site-packages/prefect/flow_engine py line 768 in result
self handle_exception(exc)
^^^^^^^^^^^^^^^^^^
File /usr/local/lib/python3 12/site-packages/prefect/flow_engine py line 1288 in run_context
display_state = (
^^^^^^^^^^
File /usr/local/lib/python3 12/site-packages/prefect/flow_engine py line 2036 in run_flow_sync
File /usr/local/lib/python3 12/site-packages/prefect/flow_engine py line 1308 in call_flow_fn
async def start(self) -> AsyncGenerator[None None]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File /usr/local/lib/python3 12/site-packages/prefect/utilities/callables/__init__ py line 348 in call_with_parameters
return fn(*args *kwargs)
^^^^^^^^^^^^^^^^^^^
File /opt/prefect/oris_codebase/scheduled_daily_update py line 348 in export_db
query_results = extract_data(db_and_queries config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File /usr/local/lib/python3 12/site-packages/prefect/tasks py line 1225 in __call__
raise VisualizationUnsupportedError(
File /usr/local/lib/python3 12/site-packages/prefect/task_engine py line 40 in <module>
from prefect client schemas objects import State TaskRunInput
ImportError cannot import name 'TaskRunInput' from 'prefect client schemas objects' (/usr/local/lib/python3 12/site-packages/prefect/client/schemas/objects py)
End of logs
Yaml
# Welcome to your prefect yaml file! You can use this file for storing and managing
# configuration for deploying your flows We recommend committing this file to source
# control along with your flow code
# Generic metadata about this project
name prefect
prefect-version 3 1 6
# build section allows you to manage and build docker images
build null
# push section allows you to manage if and how this project is uploaded to remote locations
push null
# pull section allows you to provide instructions for cloning this project in remote locations
pull
`# pull from local
directory`
# - prefect deployments steps set_working_directory
# directory /Users/lawalidris/oris_codebase
# - prefect deployments steps pip_install_requirements
# directory /Users/lawalidris/oris_codebase
# requirements_file requirements txt
# pull from github repo
- prefect deployments steps git_clone
id clone-step
repository <https //github com/drisAloma/oris_codebase git>
# If the repo is private use one of these
# access_token {{ prefect blocks secret prefect-github-access-token }}
credentials {{ prefect blocks github-credentials github-creds }}
- prefect deployments steps pip_install_requirements
directory {{ clone-step directory }}
requirements_file requirements txt
# the deployments section allows you to provide configuration for deploying flows
deployments
- name local_test_etl
version null
tags []
l
Full error below @Marvin
Encountered exception during execution: ImportError("cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)")
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1288, in run_context
display_state = (
^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2036, in run_flow_sync
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1308, in call_flow_fn
async def start(self) -> AsyncGenerator[None, None]:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/utilities/callables/__init__.py", line 348, in call_with_parameters
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/opt/prefect/oris_codebase/scheduled_daily_update.py", line 348, in export_db
query_results = extract_data(db_and_queries, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/tasks.py", line 1225, in __call__
raise VisualizationUnsupportedError(
File "/usr/local/lib/python3.12/site-packages/prefect/task_engine.py", line 40, in <module>
from prefect.client.schemas.objects import State, TaskRunInput
ImportError: cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)
Finished in state Failed("Flow run encountered an exception: ImportError: cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)")
Engine execution exited with unexpected exception
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2193, in run_flow
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2038, in run_flow_sync
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 768, in result
self.handle_exception(exc)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1288, in run_context
display_state = (
^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2036, in run_flow_sync
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1308, in call_flow_fn
async def start(self) -> AsyncGenerator[None, None]:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/utilities/callables/__init__.py", line 348, in call_with_parameters
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/opt/prefect/oris_codebase/scheduled_daily_update.py", line 348, in export_db
query_results = extract_data(db_and_queries, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/tasks.py", line 1225, in __call__
raise VisualizationUnsupportedError(
File "/usr/local/lib/python3.12/site-packages/prefect/task_engine.py", line 40, in <module>
from prefect.client.schemas.objects import State, TaskRunInput
ImportError: cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)
End of logs
m
thought for 15.7 seconds
l
.yaml Yaml
# Welcome to your prefect.yaml file! You can use this file for storing and managing
# configuration for deploying your flows. We recommend committing this file to source
# control along with your flow code.
# Generic metadata about this project
name: prefect
prefect-version: 3.1.6
# build section allows you to manage and build docker images
build: null
# push section allows you to manage if and how this project is uploaded to remote locations
push: null
# pull section allows you to provide instructions for cloning this project in remote locations
pull:
# pull from local directory
# - prefect.deployments.steps.set_working_directory:
#     directory:  /Users/lawalidris/oris_codebase
# - prefect.deployments.steps.pip_install_requirements:
#     directory:  /Users/lawalidris/oris_codebase
#     requirements_file: requirements.txt
# pull from github repo
- prefect.deployments.steps.git_clone:
id: clone-step
repository: <https://github.com/drisAloma/oris_codebase.git>
# If the repo is private, use one of these:
# access_token: "{{ prefect.blocks.secret.prefect-github-access-token }}"
credentials: "{{ prefect.blocks.github-credentials.github-creds }}"
- prefect.deployments.steps.pip_install_requirements:
directory: "{{ clone-step.directory }}"
requirements_file: requirements.txt
# the deployments section allows you to provide configuration for deploying flows
deployments:
- name: local_test_etl
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: hello.py:hello_world
parameters: {name : idris}
work_pool:
name: local-work-pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
- name: cloud_test_etl
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: hello.py:my_workflow
parameters: {}
work_pool:
name: cloud_pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
- name: oris_daily_update
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: scheduled_daily_update.py:export_db
parameters: {}
work_pool:
# name: local-work-pool
name: cloud_pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
- name: oris_etl
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: etl_to_gs_mod.py:export_db
work_pool:
name: cloud_pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
m
Thanks — this traceback makes it much clearer. This is not your flow code directly. The failure is happening inside Prefect itself:
Copy code
text
File "/usr/local/lib/python3.12/site-packages/prefect/task_engine.py", line 40, in <module>
from prefect.client.schemas.objects import State, TaskRunInput
ImportError: cannot import name 'TaskRunInput'
So the managed runtime has an incompatible Prefect package installed — one module is still trying to import
TaskRunInput
, but that symbol no longer exists in
prefect.client.schemas.objects
. What this means You likely have a broken/mismatched Prefect version in the Cloud execution environment. This can happen when: - your local Prefect version differs from the managed runtime - the managed image picked up a Prefect release with this regression - some part of the environment upgraded Prefect without the rest of the package set lining up I also found a matching community discussion: - Developing on prefect issue with new version 3.4.9 Most likely fix Pin Prefect in the deployment/runtime to a version that works consistently, instead of relying on whatever the managed environment currently resolves. If you are using a deployment definition, explicitly set Prefect to a known-good version such as the same one you use locally. For example, if your managed pool supports
pip_packages
job variables, set:
Copy code
yaml
job_variables:
  pip_packages:
    - prefect==<your-local-version>
Or if you use a custom image, build/pin it with the exact same Prefect version as local. What I recommend right now 1. Check your local version:
Copy code
bash
python -c "import prefect; print(prefect.__version__)"
2. Pin that same version in the deployment runtime 3. Redeploy and rerun If you deploy with Python You may have something like:
Copy code
python
flow.from_source(
    source="...",
    entrypoint="scheduled_daily_update.py:export_db",
).deploy(
    name="scheduled-daily-update",
    work_pool_name="my-pool",
    job_variables={
        "pip_packages": ["prefect==3.x.y"]
    },
)
Replace
3.x.y
with the version that works locally. If you deploy with prefect.yaml Add or update job variables similarly, depending on your work pool type. Important note Because the traceback shows the failure in Prefect internals, changing your own imports alone probably will not fix this specific run. The runtime Prefect installation itself needs to be aligned. If you want the fastest workaround Use a custom image or pin Prefect to the exact local version you know works. Useful links: - Deploy via Python - Deploy with prefect.yaml - Related GitHub discussion If you paste either: - your local
prefect.__version__
, and - how you deploy (
prefect.yaml
,
flow.from_source(...).deploy(...)
, or UI-managed settings) I can tell you the exact pin/config snippet to use.
l
@Marvin Yaml
# Welcome to your prefect.yaml file! You can use this file for storing and managing
# configuration for deploying your flows. We recommend committing this file to source
# control along with your flow code.
# Generic metadata about this project
name: prefect
prefect-version: 3.1.6
# build section allows you to manage and build docker images
build: null
# push section allows you to manage if and how this project is uploaded to remote locations
push: null
# pull section allows you to provide instructions for cloning this project in remote locations
pull:
# pull from local directory
# - prefect.deployments.steps.set_working_directory:
#     directory:  /Users/lawalidris/oris_codebase
# - prefect.deployments.steps.pip_install_requirements:
#     directory:  /Users/lawalidris/oris_codebase
#     requirements_file: requirements.txt
# pull from github repo
- prefect.deployments.steps.git_clone:
id: clone-step
repository: <https://github.com/drisAloma/oris_codebase.git>
# If the repo is private, use one of these:
# access_token: "{{ prefect.blocks.secret.prefect-github-access-token }}"
credentials: "{{ prefect.blocks.github-credentials.github-creds }}"
- prefect.deployments.steps.pip_install_requirements:
directory: "{{ clone-step.directory }}"
requirements_file: requirements.txt
# the deployments section allows you to provide configuration for deploying flows
deployments:
- name: local_test_etl
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: hello.py:hello_world
parameters: {name : idris}
work_pool:
name: local-work-pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
- name: cloud_test_etl
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: hello.py:my_workflow
parameters: {}
work_pool:
name: cloud_pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
- name: oris_daily_update
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: scheduled_daily_update.py:export_db
parameters: {}
work_pool:
# name: local-work-pool
name: cloud_pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
- name: oris_etl
version: null
tags: []
concurrency_limit: null
description: null
entrypoint: etl_to_gs_mod.py:export_db
work_pool:
name: cloud_pool
work_queue_name: null
job_variables: {}
enforce_parameter_schema: true
schedules: []
m
thought for 15.0 seconds
Thanks — your
prefect.yaml
helps a lot. The key detail is this:
Copy code
yaml
prefect-version: 3.1.6
That value in
prefect.yaml
is metadata, not a guarantee that the remote managed runtime will actually install/use
prefect==3.1.6
. In your Cloud pool deployment, you currently have:
Copy code
yaml
job_variables: {}
So the managed environment is free to use whatever Prefect version its runtime provides, which is likely different from your local one. That explains why local works and managed Cloud fails. What to do Explicitly pin Prefect in the deployment’s
job_variables
. Try updating the Cloud deployments like this:
Copy code
yaml
- name: oris_daily_update
  entrypoint: scheduled_daily_update.py:export_db
  parameters: {}
  work_pool:
    name: cloud_pool
    work_queue_name: null
    job_variables:
      pip_packages:
        - prefect==3.1.6
  enforce_parameter_schema: true
  schedules: []

- name: oris_etl
  entrypoint: etl_to_gs_mod.py:export_db
  work_pool:
    name: cloud_pool
    work_queue_name: null
    job_variables:
      pip_packages:
        - prefect==3.1.6
  enforce_parameter_schema: true
  schedules: []
You may also want to do the same for `cloud_test_etl`:
Copy code
yaml
- name: cloud_test_etl
  entrypoint: hello.py:my_workflow
  parameters: {}
  work_pool:
    name: cloud_pool
    work_queue_name: null
    job_variables:
      pip_packages:
        - prefect==3.1.6
  enforce_parameter_schema: true
  schedules: []
Then redeploy Run:
Copy code
bash
prefect deploy
and select/update the relevant deployments. Why this should help Your traceback shows Prefect internals importing a symbol that is missing:
Copy code
text
from prefect.client.schemas.objects import State, TaskRunInput
That indicates the runtime has a broken/incompatible Prefect package set. Pinning
prefect==3.1.6
should force the managed execution environment to use the same version as your project metadata/local setup. One important caution If your
requirements.txt
also contains
prefect
, and it specifies a different version, that can override/conflict with the
pip_packages
pin. So also check
requirements.txt
for any line like:
Copy code
text
prefect
prefect==...
prefect>=...
If it’s there, make sure it matches exactly:
Copy code
text
prefect==3.1.6
Recommended cleanup To avoid surprises, I’d do both: - pin in
requirements.txt
- pin in
job_variables.pip_packages
Example:
Copy code
text
prefect==3.1.6
and
Copy code
yaml
job_variables:
  pip_packages:
    - prefect==3.1.6
If this still fails Then the issue may be a known regression in that specific Prefect version/runtime combination, and the next step would be to pin to a different version that is known-good in Cloud. There is a related discussion here: - TaskRunInput issue discussion My strongest recommendation Change your Cloud deployments to include:
Copy code
yaml
job_variables:
  pip_packages:
    - prefect==3.1.6
redeploy, and rerun. If you want, I can rewrite your full
prefect.yaml
with the exact edits applied so you can paste it directly.
l
Rewrite the full .yaml @Marvin
m
thought for 6.3 seconds
Absolutely — here’s your
prefect.yaml
rewritten with the Prefect version pinned for the Cloud deployments.
Copy code
yaml
# Welcome to your prefect.yaml file! You can use this file for storing and managing
# configuration for deploying your flows. We recommend committing this file to source
# control along with your flow code.

# Generic metadata about this project
name: prefect
prefect-version: 3.1.6

# build section allows you to manage and build docker images
build: null

# push section allows you to manage if and how this project is uploaded to remote locations
push: null

# pull section allows you to provide instructions for cloning this project in remote locations
pull:
  # pull from github repo
  - prefect.deployments.steps.git_clone:
      id: clone-step
      repository: <https://github.com/drisAloma/oris_codebase.git>
      # If the repo is private, use one of these:
      # access_token: "{{ prefect.blocks.secret.prefect-github-access-token }}"
      credentials: "{{ prefect.blocks.github-credentials.github-creds }}"

  - prefect.deployments.steps.pip_install_requirements:
      directory: "{{ clone-step.directory }}"
      requirements_file: requirements.txt

# the deployments section allows you to provide configuration for deploying flows
deployments:
  - name: local_test_etl
    version: null
    tags: []
    concurrency_limit: null
    description: null
    entrypoint: hello.py:hello_world
    parameters:
      name: idris
    work_pool:
      name: local-work-pool
      work_queue_name: null
      job_variables: {}
    enforce_parameter_schema: true
    schedules: []

  - name: cloud_test_etl
    version: null
    tags: []
    concurrency_limit: null
    description: null
    entrypoint: hello.py:my_workflow
    parameters: {}
    work_pool:
      name: cloud_pool
      work_queue_name: null
      job_variables:
        pip_packages:
          - prefect==3.1.6
    enforce_parameter_schema: true
    schedules: []

  - name: oris_daily_update
    version: null
    tags: []
    concurrency_limit: null
    description: null
    entrypoint: scheduled_daily_update.py:export_db
    parameters: {}
    work_pool:
      name: cloud_pool
      work_queue_name: null
      job_variables:
        pip_packages:
          - prefect==3.1.6
    enforce_parameter_schema: true
    schedules: []

  - name: oris_etl
    version: null
    tags: []
    concurrency_limit: null
    description: null
    entrypoint: etl_to_gs_mod.py:export_db
    work_pool:
      name: cloud_pool
      work_queue_name: null
      job_variables:
        pip_packages:
          - prefect==3.1.6
    enforce_parameter_schema: true
    schedules: []
Also check
requirements.txt
If
requirements.txt
contains
prefect
, make sure it matches:
Copy code
text
prefect==3.1.6
Otherwise
pip_install_requirements
may install a different version and reintroduce the same issue. After updating Run:
Copy code
bash
prefect deploy
If you want, I can also give you: - a matching
requirements.txt
example, or - a version of this YAML that pins Prefect in all deployments, including local.
l
Error @Marvin
Failed to validate job configuration. Please check your deployment and work pool configuration and try again. Validation errors:
1 validation error for PrefectManagedPoolWorkerJobConfiguration
pip_packages
Input should be a valid list [type=list_type, input_value='prefect==3.1.6', input_type=str]
For further information visit
https://errors.pydantic.dev/2.13/v/list_type
m
thought for 11.2 seconds
That error means your managed pool expects
pip_packages
as a list, but the deployment is receiving it as a string. So instead of this effective value:
Copy code
yaml
pip_packages: prefect==3.1.6
it must be:
Copy code
yaml
pip_packages:
  - prefect==3.1.6
Because you’re using a Prefect Managed pool, the safest format is to pass
job_variables
as a JSON-style inline object in YAML. Use this full version:
Copy code
yaml
name: prefect
prefect-version: 3.1.6

build: null
push: null

pull:
  - prefect.deployments.steps.git_clone:
      id: clone-step
      repository: <https://github.com/drisAloma/oris_codebase.git>
      credentials: "{{ prefect.blocks.github-credentials.github-creds }}"

  - prefect.deployments.steps.pip_install_requirements:
      directory: "{{ clone-step.directory }}"
      requirements_file: requirements.txt

deployments:
  - name: local_test_etl
    version: null
    tags: []
    concurrency_limit: null
    description: null
    entrypoint: hello.py:hello_world
    parameters:
      name: idris
    work_pool:
      name: local-work-pool
      work_queue_name: null
      job_variables: {}
    enforce_parameter_schema: true
    schedules: []

  - name: cloud_test_etl
    version: null
    tags: []
    concurrency_limit: null
    description: null
    entrypoint: hello.py:my_workflow
    parameters: {}
    work_pool:
      name: cloud_pool
      work_queue_name: null
      job_variables:
        pip_packages: ["prefect==3.1.6"]
    enforce_parameter_schema: true
    schedules: []

  - name: oris_daily_update
    version: null
    tags: []
    concurrency_limit: null
    description: null
    entrypoint: scheduled_daily_update.py:export_db
    parameters: {}
    work_pool:
      name: cloud_pool
      work_queue_name: null
      job_variables:
        pip_packages: ["prefect==3.1.6"]
    enforce_parameter_schema: true
    schedules: []

  - name: oris_etl
    version: null
    tags: []
    concurrency_limit: null
    description: null
    entrypoint: etl_to_gs_mod.py:export_db
    work_pool:
      name: cloud_pool
      work_queue_name: null
      job_variables:
        pip_packages: ["prefect==3.1.6"]
    enforce_parameter_schema: true
    schedules: []
Why this happened Some deployment/work-pool combinations flatten YAML values oddly during templating/validation, and
["prefect==3.1.6"]
avoids ambiguity. Also important If your
requirements.txt
includes
prefect
, make sure it is also pinned to the same version:
Copy code
text
prefect==3.1.6
Otherwise the install step may override your managed pool package setting. Next steps 1. Replace your YAML with the version above 2. Check
requirements.txt
3. Run:
Copy code
bash
prefect deploy
If it still errors, paste the updated validation error and I’ll adjust it for your exact managed pool schema. Relevant docs: - prefect.yaml deployments - Deploy via Python
l
Error @Marvin
Flow run infrastructure exited with non-zero status code:
Essential container in task exited (Error Code: 1)
m
thought for 7.8 seconds
That means deployment validation passed, but the runtime container still crashed during execution.
Essential container in task exited (Error Code: 1)
is just the infrastructure-level failure message. The real cause will be in the flow run logs / worker logs before that line. Given your earlier traceback, the most likely situation is still one of these: 1.
requirements.txt
is reinstalling a different Prefect version 2. the managed runtime is still not actually using the version you expect 3. another dependency install step is failing before the flow starts Most likely fix now Check your
requirements.txt
and make sure it contains:
Copy code
text
prefect==3.1.6
If it currently has:
Copy code
text
prefect
or
Copy code
text
prefect>=...
or a different version, change it to the exact pin above. Because your deployment does this:
Copy code
yaml
- prefect.deployments.steps.pip_install_requirements:
    directory: "{{ clone-step.directory }}"
    requirements_file: requirements.txt
that install step can override the managed pool
pip_packages
setting. Recommended
requirements.txt
rule
Use the same Prefect version everywhere: - local environment -
requirements.txt
- managed pool
pip_packages
What to look for in logs Open the run logs and check for lines just before the container exit, especially: -
ImportError
-
pip install
failures - dependency conflicts - module not found errors If the same
TaskRunInput
error appears again, then the Prefect version pin is still not being applied consistently. Best next configuration Your setup should have both: In `prefect.yaml`:
Copy code
yaml
job_variables:
  pip_packages: ["prefect==3.1.6"]
And in `requirements.txt`:
Copy code
text
prefect==3.1.6
If you want the most stable option Instead of installing Prefect dynamically at runtime, use a custom Docker image with all dependencies preinstalled and deploy against that image. That avoids managed-runtime package drift entirely. What I need to diagnose further Please paste one of these: 1. the lines before
Essential container in task exited
2. your
requirements.txt
3. your updated
prefect.yaml
Without the earlier container logs,
Error Code: 1
is too generic by itself. Helpful docs: - prefect.yaml deployments - Deploy via Python If you paste
requirements.txt
, I can tell you immediately whether it’s overriding the Prefect pin.
l
@Marvin
aiomysql==0.2.0
aiosqlite==0.20.0
alembic==1.14.0
annotated-types==0.7.0
anyio==4.7.0
appnope==0.1.4
apprise==1.9.1
asgi-lifespan==2.1.0
asttokens==2.4.1
asyncpg==0.30.0
attrs==23.2.0
backcall==0.2.0
bcrypt==4.1.3
beautifulsoup4==4.12.3
cachetools==5.3.3
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.8
cloudpickle==3.1.0
colorama==0.4.6
comm==0.2.2
contourpy==1.2.1
coolname==2.2.0
cramjam==2.8.3
croniter==5.0.1
cryptography==42.0.7
cycler==0.12.1
dateparser==1.2.0
debugpy==1.8.1
decorator==5.1.1
Deprecated==1.2.15
docker==7.1.0
et-xmlfile==1.1.0
exceptiongroup==1.2.1
executing==2.0.1
fastapi==0.115.6
fastparquet==2024.2.0
fonttools==4.51.0
fsspec==2024.5.0
google-api-core==2.19.0
google-api-python-client==2.129.0
google-auth==2.29.0
google-auth-httplib2==0.2.0
google-auth-oauthlib==1.2.0
googleapis-common-protos==1.63.0
graphql-core==3.2.5
graphviz==0.20.3
greenlet==3.0.3
griffe==1.5.4
gspread==6.1.2
gspread-dataframe==3.3.1
h11==0.14.0
h2==4.1.0
hpack==4.0.0
httpcore==1.0.7
httplib2==0.22.0
httpx==0.28.1
humanfriendly==10.0
humanize==4.11.0
hyperframe==6.0.1
idna==3.7
importlib_metadata==8.5.0
ipykernel==6.29.4
ipython==8.24.0
jedi==0.19.1
Jinja2==3.1.5
jinja2-humanize-extension==0.4.0
jsonpatch==1.33
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter_client==8.6.1
jupyter_core==5.7.2
kiwisolver==1.4.5
Mako==1.3.8
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==3.0.2
matplotlib==3.9.0
matplotlib-inline==0.1.7
mdurl==0.1.2
natsort==8.4.0
nest-asyncio==1.6.0
numpy==1.26.4
oauth2client==4.1.3
oauthlib==3.2.2
openpyxl==3.1.2
opentelemetry-api==1.29.0
orjson==3.10.12
outcome==1.3.0.post0
packaging==24.0
pandas==2.2.2
paramiko==3.4.0
parso==0.8.4
pathspec==0.12.1
pendulum==3.0.0
pexpect==4.9.0
pickleshare==0.7.5
pillow==10.3.0
platformdirs==4.2.2
# prefect
prefect==3.1.6
# prefect==3.4.6
# prefect-github==0.3.1
prometheus_client==0.21.1
prompt-toolkit==3.0.43
proto-plus==1.23.0
protobuf==4.25.3
psutil==5.9.8
psycopg-binary==3.2.1
psycopg2-binary==2.9.9
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==16.1.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycparser==2.22
pydantic==2.10.4
pydantic-extra-types==2.10.1
pydantic-settings==2.7.0
pydantic_core==2.27.2
PyDrive==1.3.1
Pygments==2.18.0
PyMySQL==1.1.0
PyNaCl==1.5.0
pyparsing==3.1.2
PySocks==1.7.1
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-slugify==8.0.4
python-socks==2.6.0
pytz==2024.1
pyxlsb==1.0.10
PyYAML==6.0.1
pyzmq==26.0.3
readchar==4.2.1
referencing==0.35.1
regex==2024.11.6
requests==2.31.0
requests-oauthlib==2.0.0
rfc3339-validator==0.1.4
rich==13.9.4
rpds-py==0.22.3
rsa==4.9
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.12
selenium==4.21.0
sgqlc==16.4
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
sortedcontainers==2.4.0
soupsieve==2.5
SQLAlchemy==2.0.30
sshtunnel==0.4.0
stack-data==0.6.3
starlette==0.41.3
text-unidecode==1.3
time-machine==2.16.0
toml==0.10.2
tornado==6.4
traitlets==5.14.3
trio==0.25.1
trio-websocket==0.11.1
typer==0.13.1
typing_extensions==4.12.2
tzdata==2024.1
tzlocal==5.2
ujson==5.10.0
uritemplate==4.1.1
urllib3==2.2.1
uvicorn==0.34.0
wcwidth==0.2.13
websockets==13.1
wrapt==1.17.0
wsproto==1.2.0
zipp==3.21.0
# prefect
# pandas
# aiomysql
m
Your message was too long, here's your message at the allowed limit:
aiomysql==0 2 0
aiosqlite==0 20 0
alembic==1 14 0
annotated-types==0 7 0
anyio==4 7 0
appnope==0 1 4
apprise==1 9 1
asgi-lifespan==2 1 0
asttokens==2 4 1
asyncpg==0 30 0
attrs==23 2 0
backcall==0 2 0
bcrypt==4 1 3
beautifulsoup4==4 12 3
cachetools==5 3 3
certifi==2024 2 2
cffi==1 16 0
charset-normalizer==3 3 2
click==8 1 8
cloudpickle==3 1 0
colorama==0 4 6
comm==0 2 2
contourpy==1 2 1
coolname==2 2 0
cramjam==2 8 3
croniter==5 0 1
cryptography==42 0 7
cycler==0 12 1
dateparser==1 2 0
debugpy==1 8 1
decorator==5 1 1
Deprecated==1 2 15
docker==7 1 0
et-xmlfile==1 1 0
exceptiongroup==1 2 1
executing==2 0 1
fastapi==0 115 6
fastparquet==2024 2 0
fonttools==4 51 0
fsspec==2024 5 0
google-api-core==2 19 0
google-api-python-client==2 129 0
google-auth==2 29 0
google-auth-httplib2==0 2 0
google-auth-oauthlib==1 2 0
googleapis-common-protos==1 63 0
graphql-core==3 2 5
graphviz==0 20 3
greenlet==3 0 3
griffe==1 5 4
gspread==6 1 2
gspread-dataframe==3 3 1
h11==0 14 0
h2==4 1 0
hpack==4 0 0
httpcore==1 0 7
httplib2==0 22 0
httpx==0 28 1
humanfriendly==10 0
humanize==4 11 0
hyperframe==6 0 1
idna==3 7
importlib_metadata==8 5 0
ipykernel==6 29 4
ipython==8 24 0
jedi==0 19 1
Jinja2==3 1 5
jinja2-humanize-extension==0 4 0
jsonpatch==1 33
jsonpointer==3 0 0
jsonschema==4 23 0
jsonschema-specifications==2024 10 1
jupyter_client==8 6 1
jupyter_core==5 7 2
kiwisolver==1 4 5
Mako==1 3 8
Markdown==3 7
markdown-it-py==3 0 0
MarkupSafe==3 0 2
matplotlib==3 9 0
matplotlib-inline==0 1 7
mdurl==0 1 2
natsort==8 4 0
nest-asyncio==1 6 0
numpy==1 26 4
oauth2client==4 1 3
oauthlib==3 2 2
openpyxl==3 1 2
opentelemetry-api==1 29 0
orjson==3 10 12
outcome==1 3 0 post0
packaging==24 0
pandas==2 2 2
paramiko==3 4 0
parso==0 8 4
pathspec==0 12 1
pendulum==3 0 0
pexpect==4 9 0
pickleshare==0 7 5
pillow==10 3 0
platformdirs==4 2 2
# prefect
prefect==3 1 6
# prefect==3 4 6
# prefect-github==0 3 1
prometheus_client==0 21 1
prompt-toolkit==3 0 43
proto-plus==1 23 0
protobuf==4 25 3
psutil==5 9 8
psycopg-binary==3 2 1
psycopg2-binary==2 9 9
ptyprocess==0 7 0
pure-eval==0 2 2
pyarrow==16 1 0
pyasn1==0 6 0
pyasn1_modules==0 4 0
pycparser==2 22
pydantic==2 10 4
pydantic-extra-types==2 10 1
pydantic-settings==2 7 0
pydantic_core==2 27 2
PyDrive==1 3 1
Pygments==2 18 0
PyMySQL==1 1 0
PyNaCl==1 5 0
pyparsing==3 1 2
PySocks==1 7 1
python-dateutil==2 9 0 post0
python-dotenv==1 0 1
python-slugify==8 0 4
python-socks==2 6 0
pytz==2024 1
pyxlsb==1 0 10
PyYAML==6 0 1
pyzmq==26 0 3
readchar==4 2 1
referencing==0 35 1
regex==2024 11 6
requests==2 31 0
requests-oauthlib==2 0 0
rfc3339-validator==0 1 4
rich==13 9 4
rpds-py==0 22 3
rsa==4 9
ruamel yaml==0 18 6
ruamel yaml clib==0 2 12
selenium==4 21 0
sgqlc==16 4
shellingham==1 5 4
six==1 16 0
sniffio==1 3 1
sortedcontainers==2 4 0
soupsieve==2 5
SQLAlchemy==2 0 30
sshtunnel==0 4 0
stack-data==0 6 3
starlette==0 41 3
text-unidecode==1 3
time-machine==2 16 0
toml==0 10 2
tornado==6 4
traitlets==5 14 3
trio==0 25 1
trio-websocket==0 11 1
typer==0 13 1
typing_extensions==4 12 2
tzdata==2024 1
tzlocal==5 2
`ujson==5
l
Copy code
aiomysql==0.2.0
aiosqlite==0.20.0
alembic==1.14.0
annotated-types==0.7.0
anyio==4.7.0
appnope==0.1.4
apprise==1.9.1
asgi-lifespan==2.1.0
asttokens==2.4.1
asyncpg==0.30.0
attrs==23.2.0
backcall==0.2.0
bcrypt==4.1.3
beautifulsoup4==4.12.3
cachetools==5.3.3
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.8
cloudpickle==3.1.0
colorama==0.4.6
comm==0.2.2
contourpy==1.2.1
coolname==2.2.0
cramjam==2.8.3
croniter==5.0.1
cryptography==42.0.7
cycler==0.12.1
dateparser==1.2.0
debugpy==1.8.1
decorator==5.1.1
Deprecated==1.2.15
docker==7.1.0
et-xmlfile==1.1.0
exceptiongroup==1.2.1
executing==2.0.1
fastapi==0.115.6
fastparquet==2024.2.0
fonttools==4.51.0
fsspec==2024.5.0
google-api-core==2.19.0
google-api-python-client==2.129.0
google-auth==2.29.0
google-auth-httplib2==0.2.0
google-auth-oauthlib==1.2.0
googleapis-common-protos==1.63.0
graphql-core==3.2.5
graphviz==0.20.3
greenlet==3.0.3
griffe==1.5.4
gspread==6.1.2
gspread-dataframe==3.3.1
h11==0.14.0
h2==4.1.0
hpack==4.0.0
httpcore==1.0.7
httplib2==0.22.0
httpx==0.28.1
humanfriendly==10.0
humanize==4.11.0
hyperframe==6.0.1
idna==3.7
importlib_metadata==8.5.0
ipykernel==6.29.4
ipython==8.24.0
jedi==0.19.1
Jinja2==3.1.5
jinja2-humanize-extension==0.4.0
jsonpatch==1.33
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter_client==8.6.1
jupyter_core==5.7.2
kiwisolver==1.4.5
Mako==1.3.8
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==3.0.2
matplotlib==3.9.0
matplotlib-inline==0.1.7
mdurl==0.1.2
natsort==8.4.0
nest-asyncio==1.6.0
numpy==1.26.4
oauth2client==4.1.3
oauthlib==3.2.2
openpyxl==3.1.2
opentelemetry-api==1.29.0
orjson==3.10.12
outcome==1.3.0.post0
packaging==24.0
pandas==2.2.2
paramiko==3.4.0
parso==0.8.4
pathspec==0.12.1
pendulum==3.0.0
pexpect==4.9.0
pickleshare==0.7.5
pillow==10.3.0
platformdirs==4.2.2
# prefect
prefect==3.1.6
# prefect==3.4.6
# prefect-github==0.3.1
prometheus_client==0.21.1
prompt-toolkit==3.0.43
proto-plus==1.23.0
protobuf==4.25.3
psutil==5.9.8
psycopg-binary==3.2.1
psycopg2-binary==2.9.9
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==16.1.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycparser==2.22
pydantic==2.10.4
pydantic-extra-types==2.10.1
pydantic-settings==2.7.0
pydantic_core==2.27.2
PyDrive==1.3.1
Pygments==2.18.0
PyMySQL==1.1.0
PyNaCl==1.5.0
pyparsing==3.1.2
PySocks==1.7.1
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-slugify==8.0.4
python-socks==2.6.0
pytz==2024.1
pyxlsb==1.0.10
PyYAML==6.0.1
pyzmq==26.0.3
readchar==4.2.1
referencing==0.35.1
regex==2024.11.6
requests==2.31.0
requests-oauthlib==2.0.0
rfc3339-validator==0.1.4
rich==13.9.4
rpds-py==0.22.3
rsa==4.9
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.12
selenium==4.21.0
sgqlc==16.4
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
sortedcontainers==2.4.0
soupsieve==2.5
SQLAlchemy==2.0.30
sshtunnel==0.4.0
stack-data==0.6.3
starlette==0.41.3
text-unidecode==1.3
time-machine==2.16.0
toml==0.10.2
tornado==6.4
traitlets==5.14.3
trio==0.25.1
trio-websocket==0.11.1
typer==0.13.1
typing_extensions==4.12.2
tzdata==2024.1
tzlocal==5.2
ujson==5.10.0
uritemplate==4.1.1
urllib3==2.2.1
uvicorn==0.34.0
wcwidth==0.2.13
websockets==13.1
wrapt==1.17.0
wsproto==1.2.0
zipp==3.21.0
# prefect
# pandas
# aiomysql
@Marvin
Copy code
aiomysql==0.2.0
aiosqlite==0.20.0
alembic==1.14.0
annotated-types==0.7.0
anyio==4.7.0
appnope==0.1.4
apprise==1.9.1
asgi-lifespan==2.1.0
asttokens==2.4.1
asyncpg==0.30.0
attrs==23.2.0
backcall==0.2.0
bcrypt==4.1.3
beautifulsoup4==4.12.3
cachetools==5.3.3
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.8
cloudpickle==3.1.0
colorama==0.4.6
comm==0.2.2
contourpy==1.2.1
coolname==2.2.0
cramjam==2.8.3
croniter==5.0.1
cryptography==42.0.7
cycler==0.12.1
dateparser==1.2.0
debugpy==1.8.1
decorator==5.1.1
Deprecated==1.2.15
docker==7.1.0
et-xmlfile==1.1.0
exceptiongroup==1.2.1
executing==2.0.1
fastapi==0.115.6
fastparquet==2024.2.0
fonttools==4.51.0
fsspec==2024.5.0
google-api-core==2.19.0
google-api-python-client==2.129.0
google-auth==2.29.0
google-auth-httplib2==0.2.0
google-auth-oauthlib==1.2.0
googleapis-common-protos==1.63.0
graphql-core==3.2.5
graphviz==0.20.3
greenlet==3.0.3
griffe==1.5.4
gspread==6.1.2
gspread-dataframe==3.3.1
h11==0.14.0
h2==4.1.0
hpack==4.0.0
httpcore==1.0.7
httplib2==0.22.0
httpx==0.28.1
humanfriendly==10.0
humanize==4.11.0
hyperframe==6.0.1
idna==3.7
importlib_metadata==8.5.0
ipykernel==6.29.4
ipython==8.24.0
jedi==0.19.1
Jinja2==3.1.5
jinja2-humanize-extension==0.4.0
jsonpatch==1.33
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter_client==8.6.1
jupyter_core==5.7.2
kiwisolver==1.4.5
Mako==1.3.8
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==3.0.2
matplotlib==3.9.0
matplotlib-inline==0.1.7
mdurl==0.1.2
natsort==8.4.0
nest-asyncio==1.6.0
numpy==1.26.4
oauth2client==4.1.3
oauthlib==3.2.2
openpyxl==3.1.2
opentelemetry-api==1.29.0
orjson==3.10.12
outcome==1.3.0.post0
packaging==24.0
pandas==2.2.2
paramiko==3.4.0
parso==0.8.4
pathspec==0.12.1
pendulum==3.0.0
pexpect==4.9.0
pickleshare==0.7.5
pillow==10.3.0
platformdirs==4.2.2
# prefect
prefect==3.1.6
# prefect==3.4.6
# prefect-github==0.3.1
prometheus_client==0.21.1
prompt-toolkit==3.0.43
proto-plus==1.23.0
protobuf==4.25.3
psutil==5.9.8
psycopg-binary==3.2.1
psycopg2-binary==2.9.9
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==16.1.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycparser==2.22
pydantic==2.10.4
pydantic-extra-types==2.10.1
pydantic-settings==2.7.0
pydantic_core==2.27.2
PyDrive==1.3.1
Pygments==2.18.0
PyMySQL==1.1.0
PyNaCl==1.5.0
pyparsing==3.1.2
PySocks==1.7.1
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-slugify==8.0.4
python-socks==2.6.0
pytz==2024.1
pyxlsb==1.0.10
PyYAML==6.0.1
pyzmq==26.0.3
readchar==4.2.1
referencing==0.35.1
regex==2024.11.6
requests==2.31.0
requests-oauthlib==2.0.0
rfc3339-validator==0.1.4
rich==13.9.4
rpds-py==0.22.3
rsa==4.9
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.12
selenium==4.21.0
sgqlc==16.4
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
sortedcontainers==2.4.0
soupsieve==2.5
SQLAlchemy==2.0.30
sshtunnel==0.4.0
stack-data==0.6.3
starlette==0.41.3
text-unidecode==1.3
time-machine==2.16.0
toml==0.10.2
tornado==6.4
traitlets==5.14.3
trio==0.25.1
trio-websocket==0.11.1
typer==0.13.1
typing_extensions==4.12.2
tzdata==2024.1
tzlocal==5.2
ujson==5.10.0
uritemplate==4.1.1
urllib3==2.2.1
uvicorn==0.34.0
wcwidth==0.2.13
websockets==13.1
wrapt==1.17.0
wsproto==1.2.0
zipp==3.21.0
# prefect
# pandas
# aiomysql
m
Your message was too long, here's your message at the allowed limit: ```aiomysql==0 2 0 aiosqlite==0 20 0 alembic==1 14 0 annotated-types==0 7 0 anyio==4 7 0 appnope==0 1 4 apprise==1 9 1 asgi-lifespan==2 1 0 asttokens==2 4 1 asyncpg==0 30 0 attrs==23 2 0 backcall==0 2 0 bcrypt==4 1 3 beautifulsoup4==4 12 3 cachetools==5 3 3 certifi==2024 2 2 cffi==1 16 0 charset-normalizer==3 3 2 click==8 1 8 cloudpickle==3 1 0 colorama==0 4 6 comm==0 2 2 contourpy==1 2 1 coolname==2 2 0 cramjam==2 8 3 croniter==5 0 1 cryptography==42 0 7 cycler==0 12 1 dateparser==1 2 0 debugpy==1 8 1 decorator==5 1 1 Deprecated==1 2 15 docker==7 1 0 et-xmlfile==1 1 0 exceptiongroup==1 2 1 executing==2 0 1 fastapi==0 115 6 fastparquet==2024 2 0 fonttools==4 51 0 fsspec==2024 5 0 google-api-core==2 19 0 google-api-python-client==2 129 0 google-auth==2 29 0 google-auth-httplib2==0 2 0 google-auth-oauthlib==1 2 0 googleapis-common-protos==1 63 0 graphql-core==3 2 5 graphviz==0 20 3 greenlet==3 0 3 griffe==1 5 4 gspread==6 1 2 gspread-dataframe==3 3 1 h11==0 14 0 h2==4 1 0 hpack==4 0 0 httpcore==1 0 7 httplib2==0 22 0 httpx==0 28 1 humanfriendly==10 0 humanize==4 11 0 hyperframe==6 0 1 idna==3 7 importlib_metadata==8 5 0 ipykernel==6 29 4 ipython==8 24 0 jedi==0 19 1 Jinja2==3 1 5 jinja2-humanize-extension==0 4 0 jsonpatch==1 33 jsonpointer==3 0 0 jsonschema==4 23 0 jsonschema-specifications==2024 10 1 jupyter_client==8 6 1 jupyter_core==5 7 2 kiwisolver==1 4 5 Mako==1 3 8 Markdown==3 7 markdown-it-py==3 0 0 MarkupSafe==3 0 2 matplotlib==3 9 0 matplotlib-inline==0 1 7 mdurl==0 1 2 natsort==8 4 0 nest-asyncio==1 6 0 numpy==1 26 4 oauth2client==4 1 3 oauthlib==3 2 2 openpyxl==3 1 2 opentelemetry-api==1 29 0 orjson==3 10 12 outcome==1 3 0 post0 packaging==24 0 pandas==2 2 2 paramiko==3 4 0 parso==0 8 4 pathspec==0 12 1 pendulum==3 0 0 pexpect==4 9 0 pickleshare==0 7 5 pillow==10 3 0 platformdirs==4 2 2 # prefect prefect==3 1 6 # prefect==3 4 6 # prefect-github==0 3 1 prometheus_client==0 21 1 prompt-toolkit==3 0 43 proto-plus==1 23 0 protobuf==4 25 3 psutil==5 9 8 psycopg-binary==3 2 1 psycopg2-binary==2 9 9 ptyprocess==0 7 0 pure-eval==0 2 2 pyarrow==16 1 0 pyasn1==0 6 0 pyasn1_modules==0 4 0 pycparser==2 22 pydantic==2 10 4 pydantic-extra-types==2 10 1 pydantic-settings==2 7 0 pydantic_core==2 27 2 PyDrive==1 3 1 Pygments==2 18 0 PyMySQL==1 1 0 PyNaCl==1 5 0 pyparsing==3 1 2 PySocks==1 7 1 python-dateutil==2 9 0 post0 python-dotenv==1 0 1 python-slugify==8 0 4 python-socks==2 6 0 pytz==2024 1 pyxlsb==1 0 10 PyYAML==6 0 1 pyzmq==26 0 3 readchar==4 2 1 referencing==0 35 1 regex==2024 11 6 requests==2 31 0 requests-oauthlib==2 0 0 rfc3339-validator==0 1 4 rich==13 9 4 rpds-py==0 22 3 rsa==4 9 ruamel yaml==0 18 6 ruamel yaml clib==0 2 12 selenium==4 21 0 sgqlc==16 4 shellingham==1 5 4 six==1 16 0 sniffio==1 3 1 sortedcontainers==2 4 0 soupsieve==2 5 SQLAlchemy==2 0 30 sshtunnel==0 4 0 stack-data==0 6 3 starlette==0 41 3 text-unidecode==1 3 time-machine==2 16 0 toml==0 10 2 tornado==6 4 traitlets==5 14 3 trio==0 25 1 trio-websocket==0 11 1 typer==0 13 1 typing_extensions==4 12 2 tzdata==2024 1 tzlocal==5 2 ujson==5
l
@Marvin
Copy code
aiomysql==0.2.0
aiosqlite==0.20.0
alembic==1.14.0
annotated-types==0.7.0
anyio==4.7.0
appnope==0.1.4
apprise==1.9.1
asgi-lifespan==2.1.0
asttokens==2.4.1
asyncpg==0.30.0
attrs==23.2.0
backcall==0.2.0
bcrypt==4.1.3
beautifulsoup4==4.12.3
cachetools==5.3.3
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.8
cloudpickle==3.1.0
colorama==0.4.6
comm==0.2.2
contourpy==1.2.1
coolname==2.2.0
cramjam==2.8.3
croniter==5.0.1
cryptography==42.0.7
cycler==0.12.1
dateparser==1.2.0
debugpy==1.8.1
decorator==5.1.1
Deprecated==1.2.15
docker==7.1.0
et-xmlfile==1.1.0
exceptiongroup==1.2.1
executing==2.0.1
fastapi==0.115.6
fastparquet==2024.2.0
fonttools==4.51.0
fsspec==2024.5.0
google-api-core==2.19.0
google-api-python-client==2.129.0
google-auth==2.29.0
google-auth-httplib2==0.2.0
google-auth-oauthlib==1.2.0
googleapis-common-protos==1.63.0
graphql-core==3.2.5
graphviz==0.20.3
greenlet==3.0.3
griffe==1.5.4
gspread==6.1.2
gspread-dataframe==3.3.1
h11==0.14.0
h2==4.1.0
hpack==4.0.0
httpcore==1.0.7
httplib2==0.22.0
httpx==0.28.1
humanfriendly==10.0
humanize==4.11.0
hyperframe==6.0.1
idna==3.7
importlib_metadata==8.5.0
ipykernel==6.29.4
ipython==8.24.0
jedi==0.19.1
Jinja2==3.1.5
jinja2-humanize-extension==0.4.0
jsonpatch==1.33
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter_client==8.6.1
jupyter_core==5.7.2
kiwisolver==1.4.5
Mako==1.3.8
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==3.0.2
matplotlib==3.9.0
matplotlib-inline==0.1.7
mdurl==0.1.2
natsort==8.4.0
nest-asyncio==1.6.0
oauth2client==4.1.3
oauthlib==3.2.2
openpyxl==3.1.2
opentelemetry-api==1.29.0
orjson==3.10.12
outcome==1.3.0.post0
packaging==24.0
pandas==2.2.2
paramiko==3.4.0
parso==0.8.4
pathspec==0.12.1
pendulum==3.0.0
pexpect==4.9.0
pickleshare==0.7.5
pillow==10.3.0
platformdirs==4.2.2
prefect==3.1.6
prometheus_client==0.21.1
prompt-toolkit==3.0.43
proto-plus==1.23.0
protobuf==4.25.3
psutil==5.9.8
psycopg-binary==3.2.1
psycopg2-binary==2.9.9
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==16.1.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycparser==2.22
pydantic==2.10.4
pydantic-extra-types==2.10.1
pydantic-settings==2.7.0
pydantic_core==2.27.2
PyDrive==1.3.1
Pygments==2.18.0
PyMySQL==1.1.0
PyNaCl==1.5.0
pyparsing==3.1.2
PySocks==1.7.1
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-slugify==8.0.4
python-socks==2.6.0
pytz==2024.1
pyxlsb==1.0.10
PyYAML==6.0.1
pyzmq==26.0.3
readchar==4.2.1
referencing==0.35.1
regex==2024.11.6
requests==2.31.0
requests-oauthlib==2.0.0
rfc3339-validator==0.1.4
rich==13.9.4
rpds-py==0.22.3
rsa==4.9
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.12
selenium==4.21.0
sgqlc==16.4
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
sortedcontainers==2.4.0
soupsieve==2.5
SQLAlchemy==2.0.30
sshtunnel==0.4.0
stack-data==0.6.3
starlette==0.41.3
text-unidecode==1.3
time-machine==2.16.0
toml==0.10.2
tornado==6.4
traitlets==5.14.3
trio==0.25.1
trio-websocket==0.11.1
typer==0.13.1
typing_extensions==4.12.2
tzdata==2024.1
tzlocal==5.2
ujson==5.10.0
uritemplate==4.1.1
uvicorn==0.34.0
wcwidth==0.2.13
websockets==13.1
wrapt==1.17.0
wsproto==1.2.0
zipp==3.21.0
m
Your message was too long, here's your message at the allowed limit: ```aiomysql==0 2 0 aiosqlite==0 20 0 alembic==1 14 0 annotated-types==0 7 0 anyio==4 7 0 appnope==0 1 4 apprise==1 9 1 asgi-lifespan==2 1 0 asttokens==2 4 1 asyncpg==0 30 0 attrs==23 2 0 backcall==0 2 0 bcrypt==4 1 3 beautifulsoup4==4 12 3 cachetools==5 3 3 certifi==2024 2 2 cffi==1 16 0 charset-normalizer==3 3 2 click==8 1 8 cloudpickle==3 1 0 colorama==0 4 6 comm==0 2 2 contourpy==1 2 1 coolname==2 2 0 cramjam==2 8 3 croniter==5 0 1 cryptography==42 0 7 cycler==0 12 1 dateparser==1 2 0 debugpy==1 8 1 decorator==5 1 1 Deprecated==1 2 15 docker==7 1 0 et-xmlfile==1 1 0 exceptiongroup==1 2 1 executing==2 0 1 fastapi==0 115 6 fastparquet==2024 2 0 fonttools==4 51 0 fsspec==2024 5 0 google-api-core==2 19 0 google-api-python-client==2 129 0 google-auth==2 29 0 google-auth-httplib2==0 2 0 google-auth-oauthlib==1 2 0 googleapis-common-protos==1 63 0 graphql-core==3 2 5 graphviz==0 20 3 greenlet==3 0 3 griffe==1 5 4 gspread==6 1 2 gspread-dataframe==3 3 1 h11==0 14 0 h2==4 1 0 hpack==4 0 0 httpcore==1 0 7 httplib2==0 22 0 httpx==0 28 1 humanfriendly==10 0 humanize==4 11 0 hyperframe==6 0 1 idna==3 7 importlib_metadata==8 5 0 ipykernel==6 29 4 ipython==8 24 0 jedi==0 19 1 Jinja2==3 1 5 jinja2-humanize-extension==0 4 0 jsonpatch==1 33 jsonpointer==3 0 0 jsonschema==4 23 0 jsonschema-specifications==2024 10 1 jupyter_client==8 6 1 jupyter_core==5 7 2 kiwisolver==1 4 5 Mako==1 3 8 Markdown==3 7 markdown-it-py==3 0 0 MarkupSafe==3 0 2 matplotlib==3 9 0 matplotlib-inline==0 1 7 mdurl==0 1 2 natsort==8 4 0 nest-asyncio==1 6 0 oauth2client==4 1 3 oauthlib==3 2 2 openpyxl==3 1 2 opentelemetry-api==1 29 0 orjson==3 10 12 outcome==1 3 0 post0 packaging==24 0 pandas==2 2 2 paramiko==3 4 0 parso==0 8 4 pathspec==0 12 1 pendulum==3 0 0 pexpect==4 9 0 pickleshare==0 7 5 pillow==10 3 0 platformdirs==4 2 2 prefect==3 1 6 prometheus_client==0 21 1 prompt-toolkit==3 0 43 proto-plus==1 23 0 protobuf==4 25 3 psutil==5 9 8 psycopg-binary==3 2 1 psycopg2-binary==2 9 9 ptyprocess==0 7 0 pure-eval==0 2 2 pyarrow==16 1 0 pyasn1==0 6 0 pyasn1_modules==0 4 0 pycparser==2 22 pydantic==2 10 4 pydantic-extra-types==2 10 1 pydantic-settings==2 7 0 pydantic_core==2 27 2 PyDrive==1 3 1 Pygments==2 18 0 PyMySQL==1 1 0 PyNaCl==1 5 0 pyparsing==3 1 2 PySocks==1 7 1 python-dateutil==2 9 0 post0 python-dotenv==1 0 1 python-slugify==8 0 4 python-socks==2 6 0 pytz==2024 1 pyxlsb==1 0 10 PyYAML==6 0 1 pyzmq==26 0 3 readchar==4 2 1 referencing==0 35 1 regex==2024 11 6 requests==2 31 0 requests-oauthlib==2 0 0 rfc3339-validator==0 1 4 rich==13 9 4 rpds-py==0 22 3 rsa==4 9 ruamel yaml==0 18 6 ruamel yaml clib==0 2 12 selenium==4 21 0 sgqlc==16 4 shellingham==1 5 4 six==1 16 0 sniffio==1 3 1 sortedcontainers==2 4 0 soupsieve==2 5 SQLAlchemy==2 0 30 sshtunnel==0 4 0 stack-data==0 6 3 starlette==0 41 3 text-unidecode==1 3 time-machine==2 16 0 toml==0 10 2 tornado==6 4 traitlets==5 14 3 trio==0 25 1 trio-websocket==0 11 1 typer==0 13 1 typing_extensions==4 12 2 tzdata==2024 1 tzlocal==5 2 ujson==5 10 0 uritemplate==4 1 1 uvicorn==0 34 0 wcwidth==0 2 13 websockets==13 1
l
@Marvin aiomysql==0 2 0 aiosqlite==0 20 0 alembic==1 14 0 annotated-types==0 7 0 anyio==4 7 0 appnope==0 1 4 apprise==1 9 1 asgi-lifespan==2 1 0 asttokens==2 4 1 asyncpg==0 30 0 attrs==23 2 0 backcall==0 2 0 bcrypt==4 1 3 beautifulsoup4==4 12 3 cachetools==5 3 3 certifi==2024 2 2 cffi==1 16 0 charset-normalizer==3 3 2 click==8 1 8 cloudpickle==3 1 0 colorama==0 4 6 comm==0 2 2 contourpy==1 2 1 coolname==2 2 0 cramjam==2 8 3 croniter==5 0 1 cryptography==42 0 7 cycler==0 12 1 dateparser==1 2 0 debugpy==1 8 1 decorator==5 1 1 Deprecated==1 2 15 docker==7 1 0 et-xmlfile==1 1 0 exceptiongroup==1 2 1 executing==2 0 1 fastapi==0 115 6 fastparquet==2024 2 0 fonttools==4 51 0 fsspec==2024 5 0 google-api-core==2 19 0 google-api-python-client==2 129 0 google-auth==2 29 0 google-auth-httplib2==0 2 0 google-auth-oauthlib==1 2 0 googleapis-common-protos==1 63 0 graphql-core==3 2 5 graphviz==0 20 3 greenlet==3 0 3 griffe==1 5 4 gspread==6 1 2 gspread-dataframe==3 3 1 h11==0 14 0 h2==4 1 0 hpack==4 0 0 httpcore==1 0 7 httplib2==0 22 0 httpx==0 28 1 humanfriendly==10 0 humanize==4 11 0 hyperframe==6 0 1 idna==3 7 importlib_metadata==8 5 0 ipykernel==6 29 4 ipython==8 24 0 jedi==0 19 1 Jinja2==3 1 5 jinja2-humanize-extension==0 4 0 jsonpatch==1 33 jsonpointer==3 0 0 jsonschema==4 23 0 jsonschema-specifications==2024 10 1 jupyter_client==8 6 1 jupyter_core==5 7 2 kiwisolver==1 4 5 Mako==1 3 8 Markdown==3 7 markdown-it-py==3 0 0 MarkupSafe==3 0 2 matplotlib==3 9 0 matplotlib-inline==0 1 7 mdurl==0 1 2 natsort==8 4 0 nest-asyncio==1 6 0 oauth2client==4 1 3 oauthlib==3 2 2 openpyxl==3 1 2 opentelemetry-api==1 29 0 orjson==3 10 12 outcome==1 3 0 post0 packaging==24 0 pandas==2 2 2 paramiko==3 4 0 parso==0 8 4 pathspec==0 12 1 pendulum==3 0 0 pexpect==4 9 0 pickleshare==0 7 5 pillow==10 3 0 platformdirs==4 2 2 prefect==3 1 6 prometheus_client==0 21 1 prompt-toolkit==3 0 43 proto-plus==1 23 0 protobuf==4 25 3 psutil==5 9 8 psycopg-binary==3 2 1 psycopg2-binary==2 9 9 ptyprocess==0 7 0 pure-eval==0 2 2 pyarrow==16 1 0 pyasn1==0 6 0 pyasn1_modules==0 4 0 pycparser==2 22 pydantic==2 10 4 pydantic-extra-types==2 10 1 pydantic-settings==2 7 0 pydantic_core==2 27 2 PyDrive==1 3 1 Pygments==2 18 0 PyMySQL==1 1 0 PyNaCl==1 5 0 pyparsing==3 1 2 PySocks==1 7 1 python-dateutil==2 9 0 post0 python-dotenv==1 0 1 python-slugify==8 0 4 python-socks==2 6 0 pytz==2024 1 pyxlsb==1 0 10 PyYAML==6 0 1 pyzmq==26 0 3 readchar==4 2 1 referencing==0 35 1 regex==2024 11 6 requests==2 31 0 requests-oauthlib==2 0 0 rfc3339-validator==0 1 4 rich==13 9 4 rpds-py==0 22 3 rsa==4 9 ruamel yaml==0 18 6 ruamel yaml clib==0 2 12 selenium==4 21 0 sgqlc==16 4 shellingham==1 5 4 six==1 16 0 sniffio==1 3 1 sortedcontainers==2 4 0 soupsieve==2 5 SQLAlchemy==2 0 30 sshtunnel==0 4 0 stack-data==0 6 3 starlette==0 41 3 text-unidecode==1 3 time-machine==2 16 0 toml==0 10 2 tornado==6 4 traitlets==5 14 3 trio==0 25 1 trio-websocket==0 11 1 typer==0 13 1 typing_extensions==4 12 2 tzdata==2024 1 tzlocal==5 2 ujson==5 10 0 uritemplate==4 1 1 uvicorn==0 34 0 wcwidth==0 2 13 websockets==13 1
m
thought for 11.3 seconds
Your
requirements.txt
is the problem. It looks like the contents were pasted/exported with spaces instead of dots, for example:
Copy code
text
prefect==3 1 6
pydantic==2 10 4
aiomysql==0 2 0
Those are invalid version specifiers. They must be:
Copy code
text
prefect==3.1.6
pydantic==2.10.4
aiomysql==0.2.0
So the managed container is almost certainly failing during dependency installation, which explains:
Copy code
text
Essential container in task exited (Error Code: 1)
What to fix Your
requirements.txt
must be one package per line, with proper semantic versions. Example corrected lines:
Copy code
text
aiomysql==0.2.0
aiosqlite==0.20.0
alembic==1.14.0
annotated-types==0.7.0
anyio==4.7.0
apprise==1.9.1
attrs==23.2.0
beautifulsoup4==4.12.3
click==8.1.8
fastapi==0.115.6
httpx==0.28.1
pandas==2.2.2
prefect==3.1.6
pydantic==2.10.4
PyYAML==6.0.1
requests==2.31.0
SQLAlchemy==2.0.30
uvicorn==0.34.0
websockets==13.1
Important You should re-create the file from the original source rather than manually fixing that giant pasted block line by line. If you generated it using
pip freeze
, run this in your local environment again:
Copy code
bash
pip freeze > requirements.txt
That will create a properly formatted file. Then verify that it contains valid lines like:
Copy code
text
prefect==3.1.6
pydantic==2.10.4
aiomysql==0.2.0
Recommended next steps 1. Regenerate
requirements.txt
Copy code
bash
pip freeze > requirements.txt
2. Confirm
prefect==3.1.6
is in it 3. Keep your
prefect.yaml
with:
Copy code
yaml
job_variables:
  pip_packages: ["prefect==3.1.6"]
4. Redeploy:
Copy code
bash
prefect deploy
Why this matters Your deployment does:
Copy code
yaml
- prefect.deployments.steps.pip_install_requirements:
    directory: "{{ clone-step.directory }}"
    requirements_file: requirements.txt
If that file is malformed, the container will fail before the flow starts. If you want, I can help with either: - cleaning and rewriting your
requirements.txt
, or - generating a minimal
requirements.txt
with only the packages your flow actually needs The minimal version is usually more stable than freezing an entire local notebook environment.
l
@Marvin
Copy code
aiomysql==0.2.0
aiosqlite==0.20.0
alembic==1.14.0
annotated-types==0.7.0
anyio==4.7.0
appnope==0.1.4
apprise==1.9.1
asgi-lifespan==2.1.0
asttokens==2.4.1
asyncpg==0.30.0
attrs==23.2.0
backcall==0.2.0
bcrypt==4.1.3
beautifulsoup4==4.12.3
cachetools==5.3.3
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.8
cloudpickle==3.1.0
colorama==0.4.6
comm==0.2.2
contourpy==1.2.1
coolname==2.2.0
cramjam==2.8.3
croniter==5.0.1
cryptography==42.0.7
cycler==0.12.1
dateparser==1.2.0
debugpy==1.8.1
decorator==5.1.1
Deprecated==1.2.15
docker==7.1.0
et-xmlfile==1.1.0
exceptiongroup==1.2.1
executing==2.0.1
fastapi==0.115.6
fastparquet==2024.2.0
fonttools==4.51.0
fsspec==2024.5.0
google-api-core==2.19.0
google-api-python-client==2.129.0
google-auth==2.29.0
google-auth-httplib2==0.2.0
google-auth-oauthlib==1.2.0
googleapis-common-protos==1.63.0
graphql-core==3.2.5
graphviz==0.20.3
greenlet==3.0.3
griffe==1.5.4
gspread==6.1.2
gspread-dataframe==3.3.1
h11==0.14.0
h2==4.1.0
hpack==4.0.0
httpcore==1.0.7
httplib2==0.22.0
httpx==0.28.1
humanfriendly==10.0
humanize==4.11.0
hyperframe==6.0.1
idna==3.7
importlib_metadata==8.5.0
ipykernel==6.29.4
ipython==8.24.0
jedi==0.19.1
Jinja2==3.1.5
jinja2-humanize-extension==0.4.0
jsonpatch==1.33
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter_client==8.6.1
jupyter_core==5.7.2
kiwisolver==1.4.5
Mako==1.3.8
Markdown==3.7
markdown-it-py==3.0.0
MarkupSafe==3.0.2
matplotlib==3.9.0
matplotlib-inline==0.1.7
mdurl==0.1.2
natsort==8.4.0
nest-asyncio==1.6.0
oauth2client==4.1.3
oauthlib==3.2.2
openpyxl==3.1.2
opentelemetry-api==1.29.0
orjson==3.10.12
outcome==1.3.0.post0
packaging==24.0
pandas==2.2.2
paramiko==3.4.0
parso==0.8.4
pathspec==0.12.1
pendulum==3.0.0
pexpect==4.9.0
pickleshare==0.7.5
pillow==10.3.0
platformdirs==4.2.2
prefect==3.1.6
prometheus_client==0.21.1
prompt-toolkit==3.0.43
proto-plus==1.23.0
protobuf==4.25.3
psutil==5.9.8
psycopg-binary==3.2.1
psycopg2-binary==2.9.9
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==16.1.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycparser==2.22
pydantic==2.10.4
pydantic-extra-types==2.10.1
pydantic-settings==2.7.0
pydantic_core==2.27.2
PyDrive==1.3.1
Pygments==2.18.0
PyMySQL==1.1.0
PyNaCl==1.5.0
pyparsing==3.1.2
PySocks==1.7.1
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-slugify==8.0.4
python-socks==2.6.0
pytz==2024.1
pyxlsb==1.0.10
PyYAML==6.0.1
pyzmq==26.0.3
readchar==4.2.1
referencing==0.35.1
regex==2024.11.6
requests==2.31.0
requests-oauthlib==2.0.0
rfc3339-validator==0.1.4
rich==13.9.4
rpds-py==0.22.3
rsa==4.9
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.12
selenium==4.21.0
sgqlc==16.4
shellingham==1.5.4
six==1.16.0
sniffio==1.3.1
sortedcontainers==2.4.0
soupsieve==2.5
SQLAlchemy==2.0.30
sshtunnel==0.4.0
stack-data==0.6.3
starlette==0.41.3
text-unidecode==1.3
time-machine==2.16.0
toml==0.10.2
tornado==6.4
traitlets==5.14.3
trio==0.25.1
trio-websocket==0.11.1
typer==0.13.1
typing_extensions==4.12.2
tzdata==2024.1
tzlocal==5.2
ujson==5.10.0
m
thought for 9.1 seconds
This
requirements.txt
format looks valid now. But I notice something important: your pasted file cuts off at
ujson==5.10.0
. In your earlier list, there were still more packages after that, including:
Copy code
text
uritemplate==4.1.1
uvicorn==0.34.0
wcwidth==0.2.13
websockets==13.1
So first: make sure the actual
requirements.txt
in GitHub is complete and not truncated. What I think is happening now At this point, the original malformed requirements file is probably fixed, but the container is still exiting because of either: 1. the run is still hitting the original
TaskRunInput
import issue 2. your repo in GitHub does not contain the updated file yet 3. another dependency conflict is happening during install/startup 4. the deployment is using stale code from a previous deploy Most useful next step You need the actual run logs before the container exit. The line:
Copy code
text
Essential container in task exited (Error Code: 1)
is only the final ECS/managed infrastructure message, not the root cause. Please open the failed flow run logs and copy the section: - after cloning/install starts - before
Essential container in task exited
That will show whether it’s: -
pip install
failure - import failure - missing system dependency - Python exception in your code Also verify these 3 things 1. Your GitHub repo has the updated
requirements.txt
committed
Since you use:
Copy code
yaml
pull:
  - prefect.deployments.steps.git_clone:
      repository: <https://github.com/drisAloma/oris_codebase.git>
the managed run uses the repo version, not your local file. 2. Your
requirements.txt
still includes
prefect==3.1.6
I do see that in the pasted content, which is good. 3. Redeploy after commit After pushing the fixed file to GitHub, run:
Copy code
bash
prefect deploy
again so the deployment points to the updated project state. Strong recommendation Since this is a managed Cloud pool, add only the dependencies you really need instead of freezing your entire notebook/local environment. Huge
pip freeze
files often introduce avoidable conflicts. A smaller requirements file is usually much more reliable. For example, something more like:
Copy code
text
prefect==3.1.6
pandas==2.2.2
PyMySQL==1.1.0
aiomysql==0.2.0
gspread==6.1.2
gspread-dataframe==3.3.1
google-auth==2.29.0
google-auth-oauthlib==1.2.0
google-api-python-client==2.129.0
openpyxl==3.1.2
pyarrow==16.1.0
fastparquet==2024.2.0
python-dotenv==1.0.1
sshtunnel==0.4.0
paramiko==3.4.0
requests==2.31.0
That depends on what your flow actually imports, but it’s much safer than shipping Jupyter/ipython/debug packages into the runtime. What I need from you now Please send one of these: 1. the full logs just before the container exited, or 2. the import section from
scheduled_daily_update.py
, or 3. confirmation that the updated
requirements.txt
was committed and pushed to GitHub If you paste the pre-crash logs, I can identify the exact failure.
l
@Marvin Scheduled_daily_update.py
## REQUIRED MODULES AND PACKAGES
import pandas as pd
from pathlib import Path
## PREFECT MODULES
from prefect import flow, task
# ------------------------------------------------------------------
# PREFECT SETTINGS
# ------------------------------------------------------------------
PROJECT_PATH = Path.cwd()
DATA_PATH = PROJECT_PATH / "data"
CONFIG_PATH = PROJECT_PATH / "config"
# @task(log_prints=True, retries=2)
def load_bank_data():
bank_df = pd.read_csv(f'{DATA_PATH}/bank_codes_and_names.csv')
return bank_df
# @task(log_prints=True, retries=2)
def extract_data(db_and_queries, config):
print("Task started")
return 'here'
# @task(log_prints=True, retries=2)
def transform_data(query_results, bank_codes):
config = {
"banks_codes": bank_codes
}
return config
@flow(
log_prints=True,
name="Parent Flow",
flow_run_name="EXPORT DATA TO GOOGLE SHEET",
)
def export_db():
print("Starting ETL")
bank_codes = load_bank_
Requirements.txt
prefect==3.1.6
pandas==2.2.2
PyMySQL==1.1.0
aiomysql==0.2.0
gspread==6.1.2
gspread-dataframe==3.3.1
google-auth==2.29.0
google-auth-oauthlib==1.2.0
google-api-python-client==2.129.0
openpyxl==3.1.2
pyarrow==16.1.0
fastparquet==2024.2.0
python-dotenv==1.0.1
sshtunnel==0.4.0
paramiko==3.4.0
requests==2.31.0
Error message(the entirety of the log)
Flow run infrastructure exited with non-zero status code:
Essential container in task exited (Error Code: 1)
m
thought for 16.0 seconds
Thanks — this narrows it down a lot. Your
requirements.txt
now looks fine, and your flow code snippet shows the likely next issue: In the snippet, your functions are not decorated as tasks:
Copy code
python
def load_bank_data():
def extract_data(db_and_queries, config):
def transform_data(query_results, bank_codes):
but in your earlier traceback, Prefect was failing here:
Copy code
text
File "/usr/local/lib/python3.12/site-packages/prefect/tasks.py", line 1225, in __call__
...
File "/usr/local/lib/python3.12/site-packages/prefect/task_engine.py", line 40, in <module>
from prefect.client.schemas.objects import State, TaskRunInput
That means in the actual code being executed in Cloud,
extract_data(...)
is being treated as a Prefect task object, not a plain Python function. So the code running remotely is probably not the same as the snippet you pasted. Most likely explanation Your Cloud deployment is still running older code from GitHub where
extract_data
(or another function) is decorated with
@task
. That would explain why: - local behavior differs - the old
TaskRunInput
path is still involved - your snippet doesn’t match the traceback What to do next 1. Confirm the GitHub file matches your local file exactly Since the deployment clones from GitHub:
Copy code
yaml
repository: <https://github.com/drisAloma/oris_codebase.git>
the managed run uses whatever is committed there. Check
scheduled_daily_update.py
in GitHub and confirm whether these lines are actually:
Copy code
python
# @task(log_prints=True, retries=2)
def extract_data(...):
or instead:
Copy code
python
@task(log_prints=True, retries=2)
def extract_data(...):
If the decorator is active in GitHub, that explains the traceback. 2. Commit and push your latest code If you changed the decorators locally, push that to GitHub. 3. Redeploy After pushing:
Copy code
bash
prefect deploy
again. Important observation about your snippet This line is also incomplete:
Copy code
python
bank_codes = load_bank_
If that is how the real file looks in GitHub, the script would crash with a Python error immediately. So I assume the snippet is truncated — but if not, that alone would kill the container. Very likely root cause now The managed run is executing stale or different source code than you think. Because: - your traceback clearly shows Prefect task machinery being invoked - your pasted snippet shows no active
@task
- those two facts conflict Best verification step Open the exact file in GitHub that Cloud clones: -
scheduled_daily_update.py
and verify: - whether
@task
is active on
extract_data
,
load_bank_data
, or
transform_data
- whether the file is complete and syntactically valid - whether the code matches your local copy If you want a safe immediate workaround If these functions do not need to be Prefect tasks yet, keep them as plain Python functions and call them inside the flow:
Copy code
python
from prefect import flow
import pandas as pd
from pathlib import Path

PROJECT_PATH = Path.cwd()
DATA_PATH = PROJECT_PATH / "data"
CONFIG_PATH = PROJECT_PATH / "config"

def load_bank_data():
    bank_df = pd.read_csv(DATA_PATH / "bank_codes_and_names.csv")
    return bank_df

def extract_data(db_and_queries, config):
    print("Task started")
    return "here"

def transform_data(query_results, bank_codes):
    config = {
        "banks_codes": bank_codes
    }
    return config

@flow(log_prints=True, name="Parent Flow", flow_run_name="EXPORT DATA TO GOOGLE SHEET")
def export_db():
    print("Starting ETL")
    bank_codes = load_bank_data()
    query_results = extract_data({}, {})
    result = transform_data(query_results, bank_codes)
    return result
Then commit, push, and redeploy. One more thing Because your current logs show only the final infrastructure failure, I strongly suspect the platform isn’t surfacing the container stdout/stderr from startup. That makes stale code even more likely. My diagnosis
The most probable issue now is the GitHub version of
scheduled_daily_update.py
does not match what you pasted here
. Please check the GitHub copy specifically and tell me: - is
@task
commented out or active? - does the GitHub file exactly match your local file? If you paste the full GitHub version of
scheduled_daily_update.py
, I can tell you exactly what will happen in Cloud.
l
@Marvin • Yes commented out • Yes it matches ## REQUIRED MODULES AND PACKAGES import pandas as pd from pathlib import Path ## PREFECT MODULES from prefect import flow, task # ------------------------------------------------------------------ # PREFECT SETTINGS # ------------------------------------------------------------------ PROJECT_PATH = Path.cwd() DATA_PATH = PROJECT_PATH / "data" CONFIG_PATH = PROJECT_PATH / "config" # @task(log_prints=True, retries=2) def load_bank_data(): bank_df = pd.read_csv(f'{DATA_PATH}/bank_codes_and_names.csv') return bank_df # @task(log_prints=True, retries=2) def extract_data(db_and_queries, config): print("Task started") return 'here' # @task(log_prints=True, retries=2) def transform_data(query_results, bank_codes): config = { "banks_codes": bank_codes } return config @flow( log_prints=True, name="Parent Flow", flow_run_name="EXPORT DATA TO GOOGLE SHEET", ) def export_db(): print("Starting ETL") bank_codes = load_bank_data()
m
thought for 9.2 seconds
Thanks — this confirms the file now. Your current flow code is not complete:
Copy code
python
def export_db():
    print("Starting ETL")
    bank_codes = load_bank_data()
The flow ends right there. That alone is valid Python, so it should not crash just from being short. But there’s a more important issue: Your code imports
task
even though you are not using it
Copy code
python
from prefect import flow, task
Given the traceback you shared earlier, Prefect’s task machinery was being imported and failing inside:
Copy code
text
prefect/task_engine.py
from prefect.client.schemas.objects import State, TaskRunInput
Even though your functions are not decorated, importing
task
can still pull in task-related internals depending on the installed Prefect version/package state. So the cleanest next step is: Remove
task
from the import entirely
Change this:
Copy code
python
from prefect import flow, task
to this:
Copy code
python
from prefect import flow
That avoids touching the broken task engine path altogether. Updated file
Copy code
python
import pandas as pd
from pathlib import Path
from prefect import flow

PROJECT_PATH = Path.cwd()
DATA_PATH = PROJECT_PATH / "data"
CONFIG_PATH = PROJECT_PATH / "config"

def load_bank_data():
    bank_df = pd.read_csv(DATA_PATH / "bank_codes_and_names.csv")
    return bank_df

def extract_data(db_and_queries, config):
    print("Task started")
    return "here"

def transform_data(query_results, bank_codes):
    config = {
        "banks_codes": bank_codes
    }
    return config

@flow(
    log_prints=True,
    name="Parent Flow",
    flow_run_name="EXPORT DATA TO GOOGLE SHEET",
)
def export_db():
    print("Starting ETL")
    bank_codes = load_bank_data()
    print(bank_codes.head())
    return bank_codes
Why this matters Your traceback strongly suggests the failure occurs when Prefect task internals are imported. If you are not using tasks yet, don’t import
task
. Second likely issue to check This file reads:
Copy code
python
DATA_PATH = PROJECT_PATH / "data"
pd.read_csv(DATA_PATH / "bank_codes_and_names.csv")
In managed Cloud execution,
Path.cwd()
may not be what you expect. If the repo is cloned into a different working directory, the file may not exist there. A safer pattern is:
Copy code
python
PROJECT_PATH = Path(__file__).parent
DATA_PATH = PROJECT_PATH / "data"
So I recommend this instead:
Copy code
python
import pandas as pd
from pathlib import Path
from prefect import flow

PROJECT_PATH = Path(__file__).parent
DATA_PATH = PROJECT_PATH / "data"

def load_bank_data():
    bank_df = pd.read_csv(DATA_PATH / "bank_codes_and_names.csv")
    return bank_df

@flow(log_prints=True, name="Parent Flow", flow_run_name="EXPORT DATA TO GOOGLE SHEET")
def export_db():
    print("Starting ETL")
    print(f"PROJECT_PATH: {PROJECT_PATH}")
    print(f"DATA_PATH: {DATA_PATH}")
    print(f"CSV exists: {(DATA_PATH / 'bank_codes_and_names.csv').exists()}")

    bank_codes = load_bank_data()
    print(bank_codes.head())
    return bank_codes
Next steps 1. Change
from prefect import flow, task
to
from prefect import flow
2. Prefer
Path(__file__).parent
over
Path.cwd()
3. Commit and push 4. Redeploy with:
Copy code
bash
prefect deploy
If it still fails Then the managed environment may still be using a broken Prefect build despite the pin. In that case the best workaround is a custom image, rather than relying on the managed runtime package installation. Docs: - prefect.yaml deployments - Deploy via Python If you want, I can now rewrite your
scheduled_daily_update.py
into a minimal Cloud-safe version you can paste directly.
l
@Marvin The issue appears to be due to the part in the yaml file. I removed it and it worked
job_variables:
pip_packages:
- prefect==3.1.6
m
thought for 11.5 seconds
That makes sense — good catch. So the problem was not your flow code in the end, but this override in the deployment:
Copy code
yaml
job_variables:
  pip_packages:
    - prefect==3.1.6
Why removing it fixed things For a Prefect Managed pool, adding
pip_packages
can cause the runtime to install/override packages inside the managed environment. In your case, forcing
prefect==3.1.6
likely created an incompatible package state relative to the base managed image, which then led to the
TaskRunInput
import failure. So effectively: - managed base environment already had a Prefect/runtime combo -
pip_packages
overrode part of it - that left Prefect internals inconsistent - removing the override let the managed runtime use its native compatible package set What you should keep For your managed pool deployments, leave:
Copy code
yaml
job_variables: {}
or omit the section entirely if not needed. Recommended rule going forward - For Prefect Managed pools: avoid pinning
prefect
through
job_variables.pip_packages
unless absolutely necessary - Put only your application dependencies in
requirements.txt
- Let the managed runtime provide its own compatible Prefect version So this is a better
requirements.txt
pattern:
Copy code
text
pandas==2.2.2
PyMySQL==1.1.0
aiomysql==0.2.0
gspread==6.1.2
gspread-dataframe==3.3.1
google-auth==2.29.0
google-auth-oauthlib==1.2.0
google-api-python-client==2.129.0
openpyxl==3.1.2
pyarrow==16.1.0
fastparquet==2024.2.0
python-dotenv==1.0.1
sshtunnel==0.4.0
paramiko==3.4.0
requests==2.31.0
You can remove
prefect==3.1.6
from
requirements.txt
too
if you’re relying on the managed runtime’s Prefect installation. Best practice summary - Managed pool: don’t force-install Prefect unless you have a very specific reason - Custom Docker image / self-managed worker: pin Prefect explicitly there - keep your project dependencies separate from the platform runtime when possible If you want, I can rewrite your
prefect.yaml
one more time into the clean final working version based on this fix.
l
@Marvin I unconnected the task for load_bank_data function and now the error TaskInput is back;
## REQUIRED MODULES AND PACKAGES
import pandas as pd
from pathlib import Path
## PREFECT MODULES
from prefect import flow, task
# ------------------------------------------------------------------
# PREFECT SETTINGS
# ------------------------------------------------------------------
PROJECT_PATH = Path.cwd()
DATA_PATH = PROJECT_PATH / "data"
CONFIG_PATH = PROJECT_PATH / "config"
@task(log_prints=True, retries=2)
def load_bank_data():
bank_df = pd.read_csv(f'{DATA_PATH}/bank_codes_and_names.csv')
return bank_df
# @task(log_prints=True, retries=2)
def extract_data(db_and_queries, config):
print("Task started")
return 'here'
# @task(log_prints=True, retries=2)
def transform_data(query_results, bank_codes):
config = {
"banks_codes": bank_codes
}
return config
@flow(
log_prints=True,
name="Parent Flow",
flow_run_name="EXPORT DATA TO GOOGLE SHEET",
)
def export_db():
print("Starting ETL")
bank_codes = load_bank_data()
if __name__ == "__main__":
export_db()
Error;
Encountered exception during execution: ImportError("cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)")
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1288, in run_context
await self.handle_crash(exc)
^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2036, in run_flow_sync
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1308, in call_flow_fn
File "/usr/local/lib/python3.12/site-packages/prefect/utilities/callables/__init__.py", line 348, in call_with_parameters
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/opt/prefect/oris_codebase/scheduled_daily_update.py", line 48, in export_db
bank_codes = load_bank_data()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/tasks.py", line 1225, in __call__
) -> PrefectFutureList[R]:
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/task_engine.py", line 38, in <module>
from prefect.client.schemas.objects import State, TaskRunInput
ImportError: cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)
Finished in state Failed("Flow run encountered an exception: ImportError: cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)")
Engine execution exited with unexpected exception
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2193, in run_flow
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2038, in run_flow_sync
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 768, in result
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1288, in run_context
await self.handle_crash(exc)
^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 2036, in run_flow_sync
File "/usr/local/lib/python3.12/site-packages/prefect/flow_engine.py", line 1308, in call_flow_fn
File "/usr/local/lib/python3.12/site-packages/prefect/utilities/callables/__init__.py", line 348, in call_with_parameters
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/opt/prefect/oris_codebase/scheduled_daily_update.py", line 48, in export_db
bank_codes = load_bank_data()
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/tasks.py", line 1225, in __call__
) -> PrefectFutureList[R]:
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prefect/task_engine.py", line 38, in <module>
from prefect.client.schemas.objects import State, TaskRunInput
ImportError: cannot import name 'TaskRunInput' from 'prefect.client.schemas.objects' (/usr/local/lib/python3.12/site-packages/prefect/client/schemas/objects.py)
Streaming logs...
m
thought for 11.5 seconds
Yes — this confirms the real issue. Root cause The Prefect runtime in your managed environment is broken/incompatible for task execution specifically. Why? When your function is a plain Python function, the flow runs. When you add:
Copy code
python
@task(log_prints=True, retries=2)
def load_bank_data():
Prefect imports its task engine, and that engine tries to do:
Copy code
python
from prefect.client.schemas.objects import State, TaskRunInput
But in that runtime,
TaskRunInput
is missing, so the task crashes immediately. So the problem is not your task code — it is the Prefect version/package state in the managed runtime. What this tells us - Flows can run in your current environment - Tasks trigger the broken import path - your managed runtime has an inconsistent Prefect installation Practical workaround right now Do not use
@task
in that managed environment until the runtime issue is resolved. Use plain Python functions inside the flow instead:
Copy code
python
import pandas as pd
from pathlib import Path
from prefect import flow

PROJECT_PATH = Path(__file__).parent
DATA_PATH = PROJECT_PATH / "data"

def load_bank_data():
    bank_df = pd.read_csv(DATA_PATH / "bank_codes_and_names.csv")
    return bank_df

def extract_data(db_and_queries, config):
    print("Task started")
    return "here"

def transform_data(query_results, bank_codes):
    config = {
        "banks_codes": bank_codes
    }
    return config

@flow(
    log_prints=True,
    name="Parent Flow",
    flow_run_name="EXPORT DATA TO GOOGLE SHEET",
)
def export_db():
    print("Starting ETL")
    bank_codes = load_bank_data()
    print(bank_codes.head())
    return bank_codes

if __name__ == "__main__":
    export_db()
If you need real Prefect tasks Then the best fix is to stop relying on the managed runtime’s Prefect package and use a custom image or a self-managed worker where you fully control the installed Prefect version. That is the reliable way to ensure task execution uses a consistent version. Why pinning
prefect==3.1.6
didn’t help before
Because in your managed pool, overriding Prefect via
pip_packages
created other runtime inconsistencies. So: - no pin => flows work, tasks hit runtime bug - pinned Prefect => environment drift/conflicts - result => managed runtime is not stable for your task usage as configured Best path forward Option 1 — Immediate workaround - remove all
@task
decorators - keep everything as normal Python functions inside
@flow
Option 2 — Proper long-term fix - use a custom Docker image with a known-good Prefect version - or use a self-managed worker/work pool Also fix this path handling Use:
Copy code
python
PROJECT_PATH = Path(__file__).parent
instead of:
Copy code
python
PROJECT_PATH = Path.cwd()
That will be more reliable in deployments. Bottom line Your current managed environment can run flows, but appears broken for task execution due to a Prefect package mismatch around
TaskRunInput
. If you want, I can help you with either: 1. converting this flow to work without
@task
, or 2. showing you how to deploy it with a custom Docker image so
@task
works correctly.