hey all! when I was first setting up our prefect.y...
# ask-community
t
hey all! when I was first setting up our prefect.yaml I included a pull step of our git repo that wasn't actually needed because we copy the files over into the docker container. I'm trying to refactor some code but the flows on my branch are now stuck on
Copy code
Flow could not be retrieved from deployment.
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/prefect/engine.py", line 422, in retrieve_flow_then_begin_flow_run
    else await load_flow_from_flow_run(flow_run, client=client)
  File "/usr/local/lib/python3.10/site-packages/prefect/client/utilities.py", line 100, in with_injected_client
    return await fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/prefect/deployments/deployments.py", line 285, in load_flow_from_flow_run
    basepath = deployment.path or Path(deployment.manifest_path).parent
  File "/usr/local/lib/python3.10/pathlib.py", line 960, in __new__
    self = cls._from_parts(args)
  File "/usr/local/lib/python3.10/pathlib.py", line 594, in _from_parts
    drv, root, parts = self._parse_args(args)
  File "/usr/local/lib/python3.10/pathlib.py", line 578, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
I'm trying to backtrack and figure out where I went wrong but does anyone know how to get more info from this statement? is it saying that based on the
entrypoint
I specified for my flow in the prefect.yaml, it's now unable to find that path in the docker container?
b
Hi Tomas! Hmm..could be something with the entry point or maybe the path to the working directory. What does the pull step of your
prefect.yaml
look like now? 👀
Feel free to share a minimal version of the
prefect.yaml
itself if you'd prefer.
t
that's the thing, I don't have a pull step in my prefect.yaml. the code already exists and the working dir is set in the dockerfile so that the path in the entrypoint of the prefect.yaml should work. I can put together a dummy prefect.yaml in a sec but is not having a pull step potentially messing up my flow?
b
Lack of a pull step could be the issue. Whenever I create a custom docker image with my code baked in, I have this pull step in my
prefect.yaml
Copy code
pull:
- prefect.deployments.steps.set_working_directory:
    directory: /opt/prefect/<WORKING-DIRECTORY>
t
awesome, let me try adding that. thank you @Bianca Hoch!
🤞 1
b
give it a go
if that doesn't work, if you wouldn't mind sharing your dockerfile, that could help with our next troubleshooting step
t
for sure, I'll work through this and dm you the dockerfile + prefect.yaml if it doesn't work