11-01-2023 05:53 AM - edited 11-01-2023 05:56 AM
Hi
I've been working on a system to save and recall arbitrary JSON files and have run into an issue. When running the code it works fine for almost all cases but not my final test of trying to save a calibration file to the disk. During the test i get the following error.
This is perplexing as my sequence is quite straight forward as shown below
The process works for both TestContainer2 and TestContainer3 where TestContainer3 is made to include all the data cases that is in the CalibrationFile container.
Here's the stuff I've tried to replicate the issue elsewhere.
- Tested Custom Typed vs generic containers
- Tested similar container styles(TestContainer3)
- Tried recreating the python module step
- Checked paths and variable references
- Verified that the read data get transferred correctly to the CalibrationFile container before attempting export
- Running the export step without importing data first and therefore attempting to save default values to the disk
- Running the code without TestStand to verify that my code works as intended
- Tried using a differently named calibration file variable
- Tried using a calibration file variable that's stored in FileGlobals instead
I'm at a bit of a loss as to what to try next. Any ideas on how to fix this or is it a case where a bug report is needed to solve this issue?
I'm using TestStand Engine Version 2023 Q4 (23.0.0.49152) 64-bit and Sequence Editor Version 2023 Q4 (23.8) 64-bit.
Thanks in advance
- Malte
Solved! Go to Solution.
11-01-2023 01:46 PM
The previous step sets the Locals.CalibrationFile. It is possible that step is not doing what you intend.
How is the python script accessing the container, via PropertyObject API calls?
11-02-2023 02:27 AM
From what i could tell there isnt an API version for python but if there is id love to get my hands on one!
But no all containers are passed over as tuples and i can see in my variable panel that the previous step does what i intended and copies over the data to the CalibrationFile variable. However even if it didnt i would expect the export function to work but just save the default values of the CalibrationFile container.
11-02-2023 10:41 AM
Can you try passing Locals.CalibrationFileReturn.Result for your container parameter?
11-02-2023 10:53 AM
I tested it and it gave me the exact same error.
11-02-2023 11:02 AM
@MalteGS wrote:
.
...all containers are passed over as tuples...
You say you are passing tuples can you explicitly set your parameter from Dynamic to Tuple?
11-06-2023 09:22 AM
Sadly this didnt have an effect either
11-06-2023 09:29 AM
Have you stepped your python module to see if that reveals anything?
How Do I Attach a Debugger to My TestStand Sequence for Python? - NI
11-07-2023 03:12 AM
I've tried to attach the debugger to the process but ive been unable to do it in the specific case of the failing step "Export Calibration File". It works just fine in other instances. My current understanding of the situation is that the process ID popup doesn't appear because the error happens before the python code is executed. The error occurs while trying to pass the container to python but for some reason TestStand is unable to locate the container it is trying to pass.
11-07-2023 09:15 AM
I noticed a pattern in your sequence file of:
However, your last export has another step; can you try skipping the highlighted statement?