Trouble running python script with parameter in OpenHab 3

I have a script written in python. I want to run it through OpenHab 3.3.0 when item state is updated. The documentation says about executeCommandLine. But I can’t write the rule correctly to run the dsl.rule script in the graphical OpenHAB rule editor in OH3.
A script written in python must be run with a certain parameter (example: --parameter).
Here is what I have in the script in OpenHab 3: executeCommandLine(Duration.ofSeconds(5),“/usr/bin/python3”,“/opt/pylips-master/python3 --command power_on”). Do I need to use @@ instead of spaces or not? The screenshots show how I did it, but for some reason it does not work.
P.S. a script written in python in the terminal runs from openhabian without problems
I will be very grateful for your help

that is described in an example in the documentation at scripts-with-parameters .

Using @@ was the OH2 way of working while for OH3 parameters need to be separated by comma.

good that it is already tested but keep in mind the openhab process runs with privileges of user openhab. So in case you did not test the script with scope of user openhab it may fail running it from within OH.

the script ran in the terminal on behalf of openhab. I want to add that there are no errors in the logs when trying to run the script from under openhub. But it seems to me that the problem is in the correct writing of the rule with the script
Correctly edited it into this form:
executeCommandLine(Duration.ofSeconds(5), "/usr/bin/python3", "/opt/pylips-master", "python3", "", "command", "power_on ")

When given a Duration, executeCommandLine returns what ever the executed command line output. Log that.

Your last argument at the end contains a space. May be that’s a typo.
Besides that what @rlkoshak mentioned you can add debug output to very first lines of your python script to write some output to e.g. /tmp to check if it is started to execute at all.

@rlkoshak @Wolfgang_S Thanks for the advice. Thanks to your advice, I managed to get the script to run through OpenHAB. There were two problems:

  1. There were problems in access rights. OpenHAB couldn’t run the script. Decided by changing the rights of the script.
    command sudo -u openhabian python3 --command powerstate - now runs the script
  2. Wrong syntax in rule.dsl. In the terminal, I enter the command python3 --command power_on. And it works. In OpenHAB, you need to write like this:
executeCommandLine(Duration.ofSeconds(5), "/usr/bin/python3","/home/openhabian/pylips-master/", "--command", "power_on")