Hi,
Every time Photoscan opens from my script to process images I get this error:
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Agisoft\PhotoScan Pro/scripts/MenuSetup.py", line 21, in <module>
doc.chunks.add(new_chunk)
AttributeError: 'getset_descriptor' object has no attribute 'chunks'
Most of the time my images will proceed and be processed with no problem. Sometimes this causes a problem and keep Photoscan open for me which causes a problem. Any help would be appreciated.
Here is my script up to line 21,
import PhotoScan
import os
from os import listdir
from os.path import isfile, join
imageryPath = "Z:\\inbound\\"
onlyfiles = [ f for f in listdir(imageryPath) if isfile(join(imageryPath,f)) ]
crs=PhotoScan.GeoProjection()
crs.init("EPSG::3857")
doc = PhotoScan.app.document
new_chunk = PhotoScan.Chunk()
new_chunk.label = "New Chunk"
for f in onlyfiles:
path = imageryPath + f
new_chunk.photos.add(path)
new_chunk.enabled = True
doc.chunks.add(new_chunk)