简体   繁体   中英

TestStand Call Executable Step on Python Script Throws Error -17100

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:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x3k0CAA&l=en-US

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]\my_script.py is not a valid Win32 application." (using [filepath]\my_script.py 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, but calling with an empty string yields the same result. Any ideas on next steps?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM