Scott
01/21/2025, 10:18 PMMarvin
01/21/2025, 10:18 PMpathlib.Path.relative_to
, which expects both paths to be in a parent-child relationship.
To work around this issue, you can consider the following approaches:
1. Deployment Configuration: Ensure that your deployment is configured correctly. You can use a prefect.yaml
file or the flow.deploy()
method to specify deployment parameters. This might help in setting up your workflow to run from any location. More details can be found in the Prefect documentation.
2. Filesystem Handling: If the issue is related to how filesystems are handled, ensure that any relative paths are correctly resolved before being used. This can be done by converting paths to absolute paths using Path.absolute()
before invoking relative_to
.
3. Custom Script: As a workaround, you might create a custom script that changes the working directory to the one containing your workflow before executing it.
No specific issues related to this error were found in the Prefect GitHub repository, suggesting it might be a configuration or usage nuance rather than a bug.
If these suggestions don't resolve your issue, consider reaching out to the Prefect community or filing an issue with detailed information about your setup.Nate
01/21/2025, 11:31 PMNate
01/21/2025, 11:32 PMsrc/package_name
but you totally canNate
01/21/2025, 11:33 PMNate
01/21/2025, 11:35 PMmy_flow_flow.py
or is this the right filename?Scott
01/21/2025, 11:37 PMmy_flow_flow
is probably a string replacement error. I replaced all my file names and directories before submitting the question.