TestStand Error -17500 After Changing Python Script

Updated Nov 25, 2024

Reported In

Software

  • TestStand

Programming Language

  • Python

Issue Details

  • I am using Python Step Types in TestStand. After making a change in my Python script, my TestStand sequence no longer works and errors with -17500.
  • TestStand reports that my Python class does not contain the method that I am trying to call even though the Step Settings recognise the method name and the Python script correctly defines the method. What causes this?
  • After modifying a Python script, TestStand always shows the below error. The function being called in my script is valid and exists.

<class 'AttributeError'>

'<class name>' object has no attribute '<method name>'

AttributeError: '<class name>' object has no attribute <'method name'>

-17500; Operation Failed.

 

Errro 17500.PNG

Solution

This error can occur when a Python script has been changed and TestStand has not reloaded it correctly.

If the Python script includes the method/function, and the TestStand Step Settings point to the function name correctly, it will be necessary to unload the TestStand modules. There are two methods to do this:

  1. In TestStand, click File >> Unload All Modules.
  2. Refer to Unloading All TestStand Modules Programmatically to do this programmatically instead.