NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

I see a Python Interpreter crash error on running a sequence with several Python method calls. Error Message:Error in 'ModuleDir'.

Error Message:Error in 'ModuleDir'.  Python interpreter session crashed. If a console is displayed, closing the console will crash the interpreter. Complete all the executions, unload all modules and retry executing the sequence file.[Error Code: -17311]

 

PavithraBoggarm_0-1724043481577.png

 

 

0 Kudos
Message 1 of 7
(1,212 Views)

Any help on fixing this would be greatly appreciated. Thank you

0 Kudos
Message 2 of 7
(1,178 Views)

These Python calls are for methods with Selenium automation and the parameter I am passing across these various calls is the python webdriver element which returned from my previous calls. Here I see the first 2 calls are successful and from the 3rd method call onwards there is Python interpreter crash. My selenium version is 4.22 and Python version is 3.10. I have tried it with both test stand 2020 and 2021. Also tested with Chrome browser and Edge browser. Other python method calls which does not include Selenium works absolutely fine. Any help on this will be highly appreciated. Data type used for webdriver element in test stand is "Object reference"

0 Kudos
Message 3 of 7
(1,145 Views)

I have the same Problem -more or less. I deleted my Python Call and created again that worked. But If I ran another Python File I got the same Problem again. So maybe it helps you. 

 

Could you fix it ?

0 Kudos
Message 4 of 7
(801 Views)

I couldn't really solve the problem. In my case, I was seeing this error as long I was passing the Python Object as parameter. I handle this with a work around. I am still looking for a solution

0 Kudos
Message 5 of 7
(798 Views)

I think that is a Teststand bug. 
I got 3 Projects where I use different Python Classes, but I call them all the same way.

In 2 of those Projects everything just works fine, but in 1 I got this error all the time.

After I used a GUI... 

(Teststand 2019 32Bit; Python 3.6 32 Bit)

 

 

Bild (1) (1).png

0 Kudos
Message 6 of 7
(790 Views)

I’ve solved the problem. I was using a CSV file with a relative path, but it only works when I use an absolute path.

0 Kudos
Message 7 of 7
(513 Views)