Duncan
10/16/2024, 4:30 PMMarvin
10/16/2024, 4:31 PMValueError: Path /path/to/result does not exist
after deleting a result file, it's because Prefect tries to retrieve previously persisted results by default in some cases like task caching, flow retries, etc. Since the result file is missing, this retrieval process fails.
To address this issue, you need to take one of the following actions:
1. Disable result persistence for the flow (if unnecessary): You can adjust the flow's configuration to not use persisted results, thereby not looking for a result file that may not exist. This can be done by setting persist_result
to False
in your flow or task decorators:
python
from prefect import flow
@flow(persist_result=False)
def my_flow():
# your flow logic
pass
2. Recreate the result files: If the results are necessary for your flow logic, you might want to rerun the tasks or flows to regenerate the required result files.
3. Adjust Prefect server settings: If the flow run itself is stuck due to missing results, you might need to inspect Prefect server states or remove problematic runs manually from the database.
For further and detailed interaction with Prefect server, refer to official documentation:
- Prefect Result Handling Concepts
If you need more information on troubleshooting this kind of error, you can check the GitHub issue discussion for additional context: Github Issue #6779.
Let me know if you need any more help!Nate
10/16/2024, 4:32 PMDuncan
10/16/2024, 4:32 PMNate
10/16/2024, 4:35 PM» rm ~/.prefect/prefect.db && prefect server database reset -y
Downgrading database...
Upgrading database...
Prefect database "sqlite+aiosqlite:////Users/nate/.prefect/prefect.db" reset!
or in 2.x if you need to tell tasks to not use their cache (this is less awkward in 3.x) you'd need to add
refresh_cache=True
to the task that's trying to pull its result like thisDuncan
10/16/2024, 4:37 PMBring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by