Forum

Author Topic: "Document is empty" error when setting up a linux cluster through Python  (Read 2361 times)

batman93134

  • Newbie
  • *
  • Posts: 1
    • View Profile
Hi,
I'm trying to use a linux cluster to do basic photogrammetry. My server, node, and client are all non-GUI and in CentOS 7. There's a mounted folder accessible by server, node, and client alike.  I'm using the standalone Python module on client to send instructions. I have a saved project on the mounted folder with photos already imported.

Using the client, I can process the photos locally fine, but I got "Document is empty" error after sending the same task to the server. Could you help me with this?

Quote

——Terminal record for “server”——
$ ./metashape.sh --server -platform offscreen --dispatch [SERVER IP]

Agisoft Metashape Professional Version: 1.6.3 build 10711 (64 bit)
Platform: Linux
CPU: AMD EPYC 7702P 64-Core Processor
CPU family: 23 model: 49 signature: 830F10h
RAM: 7.64 GB
Starting Network Server
Binding control interface:  [SERVER IP]
binding socket: family=AF_INET (IPv4) type=SOCK_STREAM protocol=IPPROTO_TCP
waiting for incoming connections...

// Started the node, ran client.connect in Python
[NODE IP] connected
[NODE IP] node added (version 1.6.3.10711)
[CLIENT IP] connected

// Output when running nonexistent project
[NODE IP] failed #0 MatchPhotos: Can't open file: No such file or directory (2): /mnt/projects/projectThatDoesNotExist.psz

// Output when running actual project, where all photos were imported
[NODE IP] failed #1 MatchPhotos: XML syntax error

——END Terminal record for “server”——




——Terminal record for “processing node”——
$ ./metashape.sh --node -platform offscreen --dispatch [SERVER I.P.] --root /mnt/projects/

Agisoft Metashape Professional Version: 1.6.3 build 10711 (64 bit)
Platform: Linux
CPU: AMD EPYC 7702P 64-Core Processor
CPU family: 23 model: 49 signature: 830F10h
RAM: 15.5 GB
Starting Network Node
GPU device mask: default
CPU enable: no
Absolute paths: no
Base path: /mnt/projects/
Dispatch interface: [SERVER I.P.]
connected to [SERVER I.P.]
registration accepted

// Output when running nonexistent project
2020-06-16 11:09:23 MatchPhotos: accuracy = High, preselection = generic, reference, keypoint limit = 40000, tiepoint limit = 4000, apply masks = 0, filter tie points = 1
2020-06-16 11:09:23 Error: Can't open file: No such file or directory (2): /mnt/projects/projectThatDoesNotExist.psz
2020-06-16 11:09:23 processing failed in 0.003916 sec

// Output when running actual project, where all photos were imported
2020-06-16 11:15:07 MatchPhotos: accuracy = High, preselection = generic, reference, keypoint limit = 40000, tiepoint limit = 4000, apply masks = 0, filter tie points = 1
2020-06-16 11:15:07 :1: parser error : Document is empty
2020-06-16 11:15:07 PK-
2020-06-16 11:15:07 ^
2020-06-16 11:15:07 Error: XML syntax error
2020-06-16 11:15:07 processing failed in 0.006392 sec

——END Terminal record for “processing node”——



——Python record for “client” (I have navigated to the mounted folder already)——
$ python
Python 3.6.9 (default, Nov 11 2019, 11:24:16)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Metashape
>>> client = Metashape.NetworkClient()
>>> client.connect(‘[SERVER IP]’)
connected to [SERVER IP]
>>> task = Metashape.NetworkTask()
>>> task.name = 'MatchPhotos'

// running nonexistent project
>>> batch_id = client.createBatch('projectThatDoesNotExist.psz', [task])
>>> client.resumeBatch(batch_id)
>>> client.abortBatch(batch_id)

// running actual project
>>> batch_id2 = client.createBatch('project6.psz', [task])
>>> client.resumeBatch(batch_id2)
>>> client.abortBatch(batch_id2)

// processing locally, which was successful
>>> doc = Metashape.Document()
>>> doc.open("project6.psz")
LoadProject: path = project6.psz
loaded project in 0.006445 sec
>>> doc.chunk.matchPhotos()
MatchPhotos: accuracy = High, preselection = generic, reference, keypoint limit = 40000, tiepoint limit = 4000, apply masks = 0, filter tie points = 1
Can't load OpenCL library
Found 0 GPUs in 0.000584 sec (CUDA: 0.000434 sec, OpenCL: 0.000127 sec)
[CPU] photo 0: 40000 points
[CPU] photo 1: 40000 points
[CPU] photo 2: 40000 points


——END Python record for “client”——


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14853
    • View Profile
Hello batman93134,

Network processing is available only for projects saved in PSX format. Can you please check if it solves the issue?
Best regards,
Alexey Pasumansky,
Agisoft LLC