Hello Agisoft support,
I have worked for six years with Photoscan and no Metashape, and have coded in python outside of the Agisoft environment for longer. Now I am taking my first steps using Methashape Python API, and I got stuck on what seems to be a straightforward first step, defining the document object and creating the chunk. I have searched the forum as well to some extent on Stack Overflow and could not find a solution that would resolve my problem.
Basically, after I create a document and try to create a chunk,
Import Metashape
doc=Metashape.app.document
chunk=doc.chunk
I get following error:AttributeError Traceback (most recent call last)
<ipython-input-2-e7bf1adf3fae> in <module>
1 #create a processing parameter object
2 doc=Metashape.app.document
----> 3 chunk=doc.chunk
AttributeError: 'NoneType' object has no attribute 'chunk'
So it seemes like the process of creating the document object is failing- is None. Though the manual states requirements are Python 3.5, I am using Python 3.7.6 becuase that was what I already have, and Python Wheel for Windows is labeled 1.6.5-cp35.cp36.cp37-none-win_amd64.whl, so I don't think that should be the problem.
thanks