01-04-2024 10:32 AM
Hello!
So, I'm currently working on a TestStand refactor and I'm facing the following problem:
Looking for solutions, we found out that "per thread" python option in adapters might solve the issue, but it doesn't.
Does anyone recognize this inconsistence or know a way to solve this issue?
PS: We're using a venv (which is active and correctly set in adapters as well)
Thanks!
Solved! Go to Solution.
01-05-2024 12:32 AM
Could you please specify, which TestStand and Python versions you are using?
01-08-2024 09:59 AM
Hi Oli
We're using TS 2019 32-bit and Python 3.7.9.
New updates:
Now, we're trying to identify which errors might crash the session and fixing all failing scripts. We're also looking for an option that "creates" a python session for each action and how to reproduce this option for all py actions (since we've a lot of them and manually changing isn't cool)
Thanks!
01-15-2024 11:24 AM
Hello Oli, do you have any tips regarding my last update?
Thanks!
01-16-2024 01:49 AM
Sorry.... I did some research, but forgot to answer.
My original suspicion was about a TestStand Bug, I thought I'd remember. I went through the release notes, but I couldn't find anything.
I am not working with Python myself, so my possibilities are limited
01-16-2024 01:02 PM
Thats okay.
Thanks for the feedback Oli
01-17-2024 12:09 AM
We found out that python session was crashing because some scripts were failing. But, we're looking for an option that "creates" a python session for each python action, so they don't mess with each other
=> In every Python step, there is advanced settings. Using that, you can configure the interpreter session to use for executing the step. You have lot of flexibility where you can configure to use a new session for every step execution OR a session for executing few selected Python steps.
Note: If you have lot of sequence files and Python steps, you can use TestStand APIs to programmatically set the option.
Also, isn't all exception that could raise a python session crash. There's some specific errors in scripts that reproduce the issue
=> Python adapter does catch exceptions thrown from the user module and use it in the error message of the executing step. Can you provide a sample example where throwing exception is crashing the Python session? If it is a TestStand bug, we will aim to fix it in a future release.
We're using a venv (which is active and correctly set in adapters as well)
=> TestStand, as of today, does not support venv virtual environments. We support only virtualenv environments. Please ensure to use virtualenv and not venv.
-Shashidhar