<@ULVA73B9P> Failed to submit flow run 'bd4f3813-b...
# ask-marvin
f
@Marvin Failed to submit flow run 'bd4f3813-bd4a-49df-a1be-4687e73c28d5' to infrastructure. Traceback (most recent call last): File "C:\Users\fugo.takefusa\.virtualenvs\venv_prefect_local\Lib\site-packages\prefect\workers\base.py", line 1283, in _submit_run_and_capture_errors result = await self.run( ^^^^^^^^^^^^^^^ File "C:\Users\fugo.takefusa\.virtualenvs\venv_prefect_local\Lib\site-packages\prefect_docker\worker.py", line 457, in run container, created_event = await run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\fugo.takefusa\.virtualenvs\venv_prefect_local\Lib\site-packages\prefect\utilities\asyncutils.py", line 233, in run_sync_in_worker_thread result = await anyio.to_thread.run_sync( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\fugo.takefusa\.virtualenvs\venv_prefect_local\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\fugo.takefusa\.virtualenvs\venv_prefect_local\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\fugo.takefusa\.virtualenvs\venv_prefect_local\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\fugo.takefusa\.virtualenvs\venv_prefect_local\Lib\site-packages\prefect\utilities\asyncutils.py", line 243, in call_with_mark return call() ^^^^^^ File "C:\Users\fugo.takefusa\.virtualenvs\venv_prefect_local\Lib\site-packages\prefect_docker\worker.py", line 727, in _create_and_start_container self._pull_image(docker_client, configuration) File "C:\Users\fugo.takefusa\.virtualenvs\venv_prefect_local\Lib\site-packages\prefect_docker\worker.py", line 874, in _pull_image image, tag = parse_image_tag(configuration.image) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\fugo.takefusa\.virtualenvs\venv_prefect_local\Lib\site-packages\prefect\utilities\dockerutils.py", line 535, in parse_image_tag image_path, tag = image_path.split(":") ^^^^^^^^^^^^^^^ ValueError: too many values to unpack (expected 2) I I used this yaml file # 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.4.7 # build section allows you to manage and build docker images build: - prefect_docker.deployments.steps.build_docker_image: id: build_image requires: prefect-docker>=0.3.1 image_name: fugotakefusaptml/prefect-docker-repo:2 tag: local dockerfile: auto # push section allows you to manage if and how this project is uploaded to remote locations push: - prefect_docker.deployments.steps.push_docker_image: requires: prefect-docker>=0.3.1 image_name: '{{ build_image.image_name }}' tag: '{{ build_image.tag }}' # pull section allows you to provide instructions for cloning this project in remote locations pull: - prefect.deployments.steps.set_working_directory: directory: /opt/prefect/test_flows # the deployments section allows you to provide configuration for deploying flows deployments: - name: deployment_test flow_name: test_flow entrypoint: data_flows/deploy_buy.py:buy work_pool: name: docker-worker-pool work_queue_name: null job_variables: image: '{{ build_image.image }}'
m
thought for 257.3 seconds
Thanks for sharing the stack trace and your prefect.yaml — the error makes sense. What’s happening - Your
build
step sets
image_name
to
fugotakefusaptml/prefect-docker-repo:2
and also sets
tag: local
. - That results in a combined image like
fugotakefusaptml/prefect-docker-repo:2:local
(two colons). - When the Docker worker tries to parse the image, it hits
parse_image_tag(...)
which expects exactly one “:” and fails with “too many values to unpack (expected 2)”. How to fix Pick ONE of these patterns—do not include a tag in both
image_name
and
tag
. Option A: Put the tag only in
tag
Copy code
build:
- prefect_docker.deployments.steps.build_docker_image:
    id: build_image
    requires: prefect-docker>=0.3.1
    image_name: fugotakefusaptml/prefect-docker-repo
    tag: 2            # or 'local' if you prefer
    dockerfile: auto
    # optional: if you want an extra tag, add it here AND in push
    # additional_tags:
    # - local

push:
- prefect_docker.deployments.steps.push_docker_image:
    requires: prefect-docker>=0.3.1
    image_name: '{{ build_image.image_name }}'
    tag: '{{ build_image.tag }}'
    # repeat any additional tags you want to push as well
    # additional_tags:
    # - local

deployments:
- name: deployment_test
  flow_name: test_flow
  entrypoint: data_flows/deploy_buy.py:buy
  work_pool:
    name: docker-worker-pool
    job_variables:
      image: '{{ build_image.image }}'  # resolves to fugotakefusaptml/prefect-docker-repo:2
Option B: Put the tag only in
image_name
and remove
tag
Copy code
build:
- prefect_docker.deployments.steps.build_docker_image:
    id: build_image
    requires: prefect-docker>=0.3.1
    image_name: fugotakefusaptml/prefect-docker-repo:2
    dockerfile: auto
    # optional extra tag
    # additional_tags:
    # - local

push:
- prefect_docker.deployments.steps.push_docker_image:
    requires: prefect-docker>=0.3.1
    image_name: '{{ build_image.image_name }}'
    # no tag here if you put it in image_name above
    # optional extra tag to push
    # additional_tags:
    # - local

deployments:
- name: deployment_test
  flow_name: test_flow
  entrypoint: data_flows/deploy_buy.py:buy
  work_pool:
    name: docker-worker-pool
    job_variables:
      image: '{{ build_image.image }}'
Notes -
{{ build_image.image }}
is the combined
repository:tag
string and is the right value to use for
job_variables.image
. - If you want to publish multiple tags (e.g.,
2
and
local
), include
additional_tags
in both the build and push steps. - Make sure the
requires:
lines in your YAML are not HTML-escaped; it should be
prefect-docker>=0.3.1
(not
>=
). Docs - Prefect YAML and deployment steps: prefect.yaml reference - Docker deployments (build/push and image usage): Deploying with Docker If you update the YAML and redeploy (
prefect deploy
from the project root), the worker should be able to pull the image without that parsing error. If you still see issues, can you share the resolved image string that shows up in the worker logs right before the pull (e.g., “Pulling image …”)? That’ll help confirm it’s correct.