Linux: Python script execution issue from UIvision Tool

Hello Everyone

Iam facing issue in executing python script from uivision tool ,Iam using xrunandwait command to trigger python script

Please let me know ,how can we solve this issue

OS:Linux

Here is the sample code:
{
“Name”: “Testing”,
“CreationDate”: “2022-11-25”,
“Commands”: [
{
“Command”: “XRunAndWait”,
“Target”: “/home/qa/PycharmProjects/pythonProject/venv/bin/python3.8”,
“Value”: “/home/qa/PycharmProjects/automation/testcases/macros/reusable_macros/LoadData.py”,
“Description”: “”
}
]
}

Error from Logs:

  • [info] App close detected, Exit code=1

Hello, I have two questions:

  1. What flavor of Linux are you using?

  2. As a potential workaround and test, can you please try starting a shell script file instead, and from within this shell script file start your Python script?

HI Admin

Thanks for your response.

1.Iam using ubuntu 20.04.4 LTS flavour of linux

2.tried to execute through shell script,still facing the same issue

{
  "Name": "Testing",
  "CreationDate": "2022-11-28",
  "Commands": [
    {
      "Command": "XRunAndWait",
      "Target": "/home/pavan/PycharmProjects/pythonProject/venv/bin/python3.8",
      "Value": "/home/pavan/PycharmProjects/uivision_automation/testcases/macros/reusable_macros/First.sh",
      "Description": ""
    }
  ]
}

Logs:

  • [info]

Executing: | XRunAndWait | /home/pavan/PycharmProjects/pythonProject/venv/bin/python3.8 | /home/pavan/PycharmProjects/uivision_automation/testcases/macros/reusable_macros/First.sh |

  • [info]

App close detected, Exit code=1

  • [info]

Macro completed (Runtime 0.11s)

HI Team

Can anyone please reply to my Query

Thanks

I have no problem on my Chromebook with Debian linux using;

  {
      "Command": "XRunAndWait",
      "Target": "/usr/bin/python3 ",
      "Value": "/home/support/z.py",
      "Description": "python script needs explicit file paths"
    },
    {
      "Command": "store",
      "Target": "${!xrun_exitcode}",
      "Value": "strng",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Python script exit code: ${strng}",
      "Value": "",
      "Description": ""
    }

If your getting an error code = 1 uivision is not finding your python executable or script

2 Likes