Hello again
I have another problem concerning the processing of a project on the Cloud. Here is my script:
import Metashape
from os import path, listdir
def import_images(chunk):
img_folder = path.join(My, Path, Joined)
img_list = listdir(img_folder)
for i in img_list:
new_path = path.join(img_folder, i)
print(new_path)
chunk.addPhotos([new_path])
def build_task_list(tasks):
'''Match photos'''
task = Metashape.Tasks.MatchPhotos()
task.downscale = 0
task.keypoint_limit = 40000
task.tiepoint_limit = 4000
task.generic_preselection = True
task.reference_preselection = True
# '''Compile the match photos task'''
# n_task = Metashape.NetworkTask()
# n_task.name = task.name
# n_task.params = task.encode()
# n_task.frames.append((chunk.key, 0))
# tasks.append(n_task)
tasks.append(task)
return tasks
def main():
output_path = path.join(Another, Path, Joined)
tasks = []
doc = Metashape.Document()
doc.save(output_path)
chunk = doc.addChunk()
import_images(chunk)
tasks = build_task_list(tasks)
doc.save()
client = Metashape.CloudClient()
client.username = **********
client.password = ************
client.processProject(doc,tasks)
main()
The problem is that once the code gets to the "client.processProject' part, I get an error saying that a "Task object is expected".
I found another post on this forum with a similar problem (
https://www.agisoft.com/forum/index.php?topic=13259.msg58833#msg58833) but there was no answer. I also tried to follow
https://www.agisoft.com/forum/index.php?topic=10734.0, but here I get an error saying that the Method is not allowed. Of course, I have also been combing the user reference manual, but I haven't found anything that could help me further.
Thank you in advance for your help
Popi