Agisoft Metashape

Agisoft Metashape => Bug Reports => Topic started by: EE on October 08, 2021, 02:14:26 PM

Title: exportPoints crashing with local path
Post by: EE on October 08, 2021, 02:14:26 PM
The following code snippet displays the error which seems to be a regression somewhere between 1.6.3 and 1.7.4.
Code: [Select]
    doc = Metashape.Document()
    doc.addChunk()
    doc.chunk.crs = Metashape.CoordinateSystem("EPSG::3857")
    doc.save("PSP.psx")

    doc.chunk.importPoints(las_path, crs=Metashape.CoordinateSystem("EPSG::3857"))

    doc.chunk.exportPoints(os.path.abspath("test1.zip"), format=Metashape.PointsFormat.PointsFormatCesium)
    print('ok1')
    doc.chunk.exportPoints("test2.zip", format=Metashape.PointsFormat.PointsFormatCesium)
    print('ok2')

Which errors with the following logs
Code: [Select]
ExportPoints: path = /ABS/test1.zip, format = PointsFormatCesium
point cloud size: 1065 points
ok1
ExportPoints: path = test2.zip, format = PointsFormatCesium
Traceback (most recent call last):
  File "XXX.py", line 19, in <module>
    doc.chunk.exportPoints("test2.zip", format=Metashape.PointsFormat.PointsFormatCesium)
OSError: Can't create directory: No such file or directory (2):

Thanks for any support