System.util.execute, command string

I do


but it gives an error

Blockquote Cannot run program "/usr/local/bin/ignition/data/TJ/python3": CreateProcess error=2, The system cannot find the file specified

The file does exist. What command string should I use to run
Note, I am running ignition in a raspberry pi.

Are you running the client on the same computer as the gateway? Which computer has /usr/local/bin/ignition/data/TJ/python3 Perspective will only look on the gateway computer.

It's running at the gateway.

Those should be 2 separate elements in the array, i.e.

system.util.execute(["/usr/local/bin/ignition/data/TJ/python3", ""])

I'm still getting the same error.

tried below, also same error


What’s the exact error?

What scope are you running this from? It looks like you have python3 installed on the Gateway, so running it from the designer script console, for example, will not work. The path to the file you’re trying to execute may also be relative to the Ignition dir, so you might need to either make it absolute or account for that.

Why would you expect this to work? Did you install the ls executable in that folder?

Is python3 installed in that folder? You need the path to the executable.

Tip: Use the </>` Preformatted Text button for code, not the " Blockquote button.

1 Like

Aah, got you! Thanks pturmel for the clue.

Change it to

system.util.execute(["python3", "/usr/local/bin/ignition/data/TJ/""])

Thanks to Transistor for the tip.