Hey all, I keep getting the following error when t...
# ask-community
d
Hey all, I keep getting the following error when trying to deploy a prefect flow:
Copy code
% prefect deploy --name atl-asset-processing-and-alerting-pipeline_dev --prefect-file prefect_dev.yaml
Running deployment build steps...
 > Running build_docker_image step...
Step 1/19 : FROM --platform=linux/amd64 python:3.10.12-slim
 ---> 4d440b214e44
Step 2/19 : WORKDIR /opt/prefect/atl-data-pipeline
Traceback (most recent call last):
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/deployments/steps/core.py", line 154, in run_steps
    step_output = await run_step(step, upstream_outputs)
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/deployments/steps/core.py", line 125, in run_step
    result = await from_async.call_soon_in_new_thread(
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 327, in aresult
    return await asyncio.wrap_future(self.future)
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 352, in _run_sync
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect_docker/deployments/steps.py", line 200, in build_docker_image
    raise BuildError(event["error"])
prefect.utilities.dockerutils.BuildError: NotFound: content digest sha256:722de475f5c2221f2a474ab46be25e9693c92ad57e73082c55a1296c7a646a21: not found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/cli/_utilities.py", line 42, in wrapper
    return fn(*args, **kwargs)
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 311, in coroutine_wrapper
    return call()
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 432, in __call__
    return self.result()
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 318, in result
    return self.future.result(timeout=timeout)
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 179, in result
    return self.__get_result()
  File "/usr/local/Cellar/python@3.10/3.10.14_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/_internal/concurrency/calls.py", line 389, in _run_async
    result = await coro
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/cli/deploy.py", line 429, in deploy
    await _run_single_deploy(
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/client/utilities.py", line 100, in with_injected_client
    return await fn(*args, **kwargs)
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/cli/deploy.py", line 655, in _run_single_deploy
    await run_steps(build_steps, step_outputs, print_function=app.console.print)
  File "/Users/dansimons/amygda/angel-class180-project/atl_env/lib/python3.10/site-packages/prefect/deployments/steps/core.py", line 182, in run_steps
    raise StepExecutionError(f"Encountered error while running {fqn}") from exc
prefect.deployments.steps.core.StepExecutionError: Encountered error while running prefect_docker.deployments.steps.build_docker_image
An exception occurred.
I am using prefect v2.20.2 and docker v27.2.0 I have checked my docker is working and this image is available for me to pull manually. Not sure why I keep getting this error?
a
I was also experiencing this this issue and never found the cause or a proper solution. Switching from Docker Desktop to OrbStack fixed it for me.
🚀 1
d
Hmmm interesting. I remember I had this issue a few months ago and reinstalling docker resolved it but not even that is working now. Thanks for your tip. I will try OrbStack
OrbStack works great thank you so much @Anže!
🙌 2
a
Daniel, are you located outside of the US? I'm asking because my coworkers and I figured out that this issue only happens when we try to create a deployment from Europe. If you switch location to the US (e.g. with a VPN) the issue goes away. 🤯 I've created an issue about this: https://github.com/PrefectHQ/prefect/issues/15928. Hope we can get it solved because this has been VERY frustrating to debug. /cc @Bianca Hoch if you can get some eng eyes on this we would greatly appreciate it! I'm available if any other info is needed regarding this!
👀 1
thank you 1
d
Ah interesting. Yes I am outside the US - based in Europe. Very odd that it works only from the US! Thanks for creating the issue
👍 1