sparkfish/augraphy

Pipeline fails on cached images

proofconstruction opened this issue · 4 comments

We need to correct the pipeline's handling of cached images; in long renders (>100 images) I often run into a FileNotFoundError like so:

File "/home/ubuntu/generate_augraphy.py", line 23, in run_pipeline
 data = pipeline.augment(image)
File "/home/ubuntu/.venv/lib/python3.10/site-packages/augraphy/base/augmentationpipeline.py", line 152, in augment
 os.remove(outfilename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/augraphy_cache/image_11.png'

Thanks, i think the evaluation to check if the file exist is missing out here, i will check and correct it.

I pushed an edit here: #230

So the problem may occur only in parallel execution, where multiple processes are deleting a same file. In this case, i remove the file deletion part because the same file will be get replaced anyway. Please try again if you facing any other issue.

Is there any way to validate that this issue is resolved and can now be closed?

This should be resolved since @proofconstruction was able to generate those images previously. @proofconstruction could you confirm on this?