When starting, it seems that PhotoScan requires the project to be a .psz file. (e.g., The following snippet doesnt work if I try to use the '.psx' file suffix.)
doc = ps.app.document
project_path = ps.app.getSaveFileName("Specify project filename for saving: ")
if not project_path:
print("Script aborted")
if project_path[-4:].lower() != ".psz":
project_path += ".psz"
doc.save(project_path)
ps.app.update()
However, while the process is running, specifically before I can make the DEM, I am promted to save as a .PSX file before I can continue... and the script errors out. as seen here.
BuildDem: source data = Dense cloud, interpolation = Enabled, resolution = 0 Please save project in PSX format before processing
Traceback (most recent call last):
File "run.py", line 130, in <module> interpolation=ps.EnabledInterpolation
RuntimeError: Empty frame path
I have tried this...
psx_prj = project_path[:-4] + '.psx'
doc.save(psx_prj)
ps.app.update()
but i get an error..
Traceback (most recent call last):
File "run.py", line 129, doc.save(psx_prj)
in <module>
RuntimeError: Can't save project
How can I save the project as a PSX so I can continue building raster products?
just to clarify
import os
import PhotoScan as ps
doc = ps.app.document
doc.save("test.psz")
ps.app.update()
returns
SaveProject
saved project in 0.003522 sec
but
import os
import PhotoScan as ps
doc = ps.app.document
doc.save("test.psx")
returns
SaveProject
Traceback (most recent call last):
File "save_script.py", line 8, in <module>
doc.save("test.psx")
RuntimeError: Can't save project
Any ideas?