I have an issue with occasional freezes within my python processing chain where I try to save the PhotoScan project. The saving will take hours and does not stop. When I try to cancel it, it does not cancel and the saving project dialogue stays open. I have to kill the Agisoft process and lose all my progress. The most recent freeze was in this part of code:
doc = PhotoScan.Document()
doc.save(SomePath, chunks=doc.chunks)
# some other processes
chunk = doc.chunks[0]
if something:
1_chunk = doc.chunks[1]
2_chunk = doc.chunks[2]
else:
1_chunk = doc.chunks[0]
1_chunk.buildOrthomosaic(surface=PhotoScan.DataSource.ModelData, blending=PhotoScan.MosaicBlending,
color_correction=bool(Color_correction), fill_holes=True)
doc.save()
The freeze occurs on the last doc.save()
I guess the code will not say too much. However, maybe I am doing something wrong with redeclaring chunks, or I have to reopen the Photoscan document. I get these freezes occasionally and they can occur in other parts of the chain.