NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Missing report entries for call executable step with python script

Solved!
Go to solution

Any idea what I am doing wrong? The HTML report doesn't contain standard output from the script.

Download All
0 Kudos
Message 1 of 6
(2,966 Views)

Part of my problem is that I needed double backslashes in my argument:

 

"C:\\Users\\me\\Downloads\\calling_hello_world\\helloWorld.py"

The main issue is that TestStand 2013 doesn't seem to add data to the report (html or ascii) if the step result has step type CallExecutable. Is this a known issue? The entries are added to the database and the offline results file.

 

Edit to add: Under the Standard Output/Error tab, the output destination is 'store in variable/property', specifically 'Step.StdOutput.Text'.  I also added Standard Output to additional results as the documentation requested.

0 Kudos
Message 2 of 6
(2,925 Views)

That is interesting. As far as the filepath is concerned, it looks like the first slash is acting as an escape character. This thread discusses similar behavior, but kind of peters out...

 

To your issue, can you confirm that the script is actually being run? When I run things through TestStand on my end, I do not see a command prompt window appear as it does whenever I run the script by double clicking it.

 

Best,

Sam R.
0 Kudos
Message 3 of 6
(2,914 Views)

Hi Sam. The script is run, and the results are visible in the offline results file and the database. They are just not parsed into the report file.

0 Kudos
Message 4 of 6
(2,910 Views)

One issue I found out though a support ticket was that I needed to use the ActivePython distribution for this to work (ie in the call settings have the file pathname be the script name, without having to put the path to the python executable there). I am not sure whether it is because of the way that ActivePython sets up the environmental variables or something else, but neither vanilla python nor Anaconda worked.

 

The report entries issue turned out to be something related to my Configure->Result Processing->Report settings->Result Filtering Expression settings.

0 Kudos
Message 5 of 6
(2,826 Views)
Solution
Accepted by topic author stephenb2

I take back what I said in the previous post. It appears that different distributions of python set up the file associations in different ways. Anaconda and presumably other distributions, for example, will work when the file association is made like this (from stackoverflow😞

 

  1. Launch a command prompt.

  2. Associate the correct file group with .py scripts:

    assoc .py=Python.File

Redirect all Python files to the new executable:

    ftype Python.File=C:\Path\to\pythonw.exe "%1" %*

 

0 Kudos
Message 6 of 6
(2,815 Views)