Forum

Author Topic: exportPoints crashing with local path  (Read 273 times)

EE

  • Newbie
  • *
  • Posts: 21
    • View Profile
exportPoints crashing with local path
« 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
« Last Edit: October 08, 2021, 02:16:42 PM by EE »