Forum

Author Topic: Exception on PointCloud.compactPoints()  (Read 39672 times)

jolle

  • Newbie
  • *
  • Posts: 7
    • View Profile
Exception on PointCloud.compactPoints()
« on: February 02, 2026, 04:58:04 PM »
I installed Metashape 2.3.0 (build 21954) on a Windows 11 machine.

When I open an a Metashape project with a single chunk with a pointcloud, calling .compactPoints() on the pointcloud gives an exception. Is this function broken in version 2.3?

Code: [Select]
Metashape.app.document.chunk.point_cloud
Out[3]: 2026-02-02 14:51:08 <PointCloud '56220811 points'>

Metashape.app.document.chunk.point_cloud.compactPoints()
2026-02-02 14:51:09 CompactPointCloud: point_cloud = 0
2026-02-02 14:51:09 Finished processing in 0 sec (exit code 0)
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
Cell In[4], line 1
----> 1 Metashape.app.document.chunk.point_cloud.compactPoints()

Exception: Null point cloud

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15727
    • View Profile
Re: Exception on PointCloud.compactPoints()
« Reply #1 on: February 06, 2026, 03:51:30 PM »
Hello jolle,

Thank you for reporting, we'll take a look at this problem.

Meanwhile you can try to use the following workaround:

Code: [Select]
task = Metashape.Tasks.CompactPointCloud()
task.point_cloud = Metashape.app.document.chunk.point_cloud.key
task.apply(Metashape.app.document.chunk)
Best regards,
Alexey Pasumansky,
Agisoft LLC

jolle

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Exception on PointCloud.compactPoints()
« Reply #2 on: February 09, 2026, 02:02:55 PM »
Hi Alexey,

The workaround works like a charm. Thanks a lot!