Author Topic: Trigger Python script over network  (Read 1232 times)


  • Newbie
  • *
  • Posts: 6
    • View Profile
Trigger Python script over network
« on: January 26, 2023, 01:41:35 PM »
Hi everybody,

we have been using Metashape for some time to create aerial orthomosaics. For this, I have developed a Python script that performs this process fully automatically. Our Metashape instance is installed on a powerful Windows 10 client.

In our IT infrastructure, we have a separate (less powerful) Windows server running an FME server application. FME is an ETL tool focused on geospatial data. A workflow of this ETL tool should now first trigger the existing Python script on the powerful client. This is followed by further processing steps of the ETL tool with the goal of providing the data via GeoServer as a web map service.

Currently, it is planned that a separate Python script is executed initially when the ETL workflow is executed - this then calls the Metashape script via subprocess call.

Code: [Select]
import subprocess

# ... some stuff

output = subprocess.check_output([r'\\<machine>\c$\<install_path>\metashape.exe', '-r', r'\\<machine>\<path>\'])

# ... other stuff

I've been struggling with our IT for several weeks now to make sure that the service account of the ETL tool gets permission to run the Metashape script on the client (Windows Server and Metashape client are on the same company network).

After another phone call with our IT, I was now tasked with finding out what permissions are intended to be granted by the vendor to allow me to run the script as requested.  :o ??

In my eyes, the service account here only needs to be granted network access for the hidden share (\\<address>\c$\<path>\metashape.exe) as well as an execute permission, but maybe I'm just missing something?

Are there any other, possibly even better ways to implement my project? For the reasons mentioned above, the implementation should better not become too complicated...  ;D

Thanks for any helpful feedback.