NI TestStand

Showing results for 
Search instead for 
Did you mean: 

TestStand Call Executable Step on Python Script Throws Error -17100

Go to solution

I'm using TestStand 2019, and Python 3.9. Additionally, I'm using a virtual environment created with virtualenv and not venv (because TestStand only works with the former). The adapter is set to use the Global interpreter, the version is set to 3.9, and I'm pointing to my virtual env directory in the adapter. Additionally, I have ensured that 3.9 is in the Path environment variable. I'm using this document as a reference for calling the script:


I've verified that I can call the script from command line, and it operates as expected. However, if I use the procedure documented above, I receive the following error message from TestStand:


Run-Time Error:


Details: "[filepath]\ is not a valid Win32 application." (using [filepath]\ to hide actual names)


Error Code: "-17100; Incorrect File format."


I don't know of any means to get more information from TestStand as to the actual cause of the error. Originally, I thought it may be because I was passing in arguments into Argument Expression (see here, but calling with an empty string yields the same result. Any ideas on next steps?

0 Kudos
Message 1 of 2
Accepted by topic author peterg_noffz

Figured it out. Was pointing to the Lib/site-packages location of the .py script when I should have been pointing to the .exe in Scripts of my virtual env directory. 

0 Kudos
Message 2 of 2