Agisoft Metashape > Python and Java API

Updating Batch Processing Script from Agisoft 1.0 to 1.4

(1/1)

geomorph:
Hello,

I am trying to update a python script that was used for batch processing large numbers of photos in Agisoft 1.0 to Agisoft 1.4.

I am working with a dataset (photos, target locations, and camera calibration file) that was run successfully through the old version - so the only difference is the version of Agisoft!

I am not a coder, and I did not write this code so any help would be greatly appreciated.

The original code:
doc = PhotoScan.app.document
        doc.clear()
        chunk = PhotoScan.Chunk()
        chunk.label = "New_Chunk"
        doc.chunks.add(chunk)

TypeError: cannot create 'Chunk' instances



When I force it past that point the next problem comes from the original script:

calib_in = PhotoScan.Calibration()
        calib_in.load(CalibFile)
        try:
            sensor = chunk.sensors[0]

IndexError: list index out of range

Thank you in advance.

Alexey Pasumansky:
Hello geomorph,

I assume that the issue is already solved via support?

geomorph:
Yes, thank you!

Navigation

[0] Message Index

Go to full version