Forum

Author Topic: Network crash when assign the pairs parameter in "MatchPhotos" network task  (Read 364 times)

chq

  • Newbie
  • *
  • Posts: 3
    • View Profile
I want to do  matchphoto  task using the defined list of camera pairs by python script.
this is my scripts:

Code: [Select]
import Metashape as ms
chunk = ms.app.document.chunk
task = ms.Tasks.MatchPhotos()
for idx in range(len(chunk.cameras) - 1):
    pairs.append((chunk.cameras.key, chunk.cameras[idx + 1].key))
task.pairs = pairs
# task.apply(chunk)  # it is ok when run in local computer
# convert to network  task
nt = task.toNetworkTask(chunk)
client = ms.NetworkClient()
client.connect('192.168.1.10')
proj_path = ms.app.document.path
batch_id = client.createBatch(proj_path[proj_path.find(":") + 2:], [nt])
client.resumeBatch(batch_id)

It is ok when task is not  network task
but when  convert to network task,  network will crash.
if  task.pairs  parameter is not assigned.   network task is ok

metashpe version is 1.7.1
« Last Edit: December 16, 2021, 06:07:05 AM by chq »