PSSE35 psspy.pssehalt_2()
I have a Python automation tool that has options to print out several different types of reports.
It works well with PSSE34, but in PSSE35, it crashes when the psspy.pssehalt2() function is called and psseinit() is called after. I tried commenting psspy.pssehalt2() out which in some cases is ok, but it appears that calling pssehalt_2() is still necessary because without it, psseinit() crashes routinely and I have trouble initializing simulations.
It seems to me that psspy.pssehalt_2() is bugged.
Does anyone know a workaround for this? PSSE version 35.6, Python 3.7 64-bit. I have the same issue in Python 3.9 64-bit.
Thanks.
EDIT to add code:
This code does not work in PSSE35. It crashes in the second loop.
import sys
sys.path.insert(0,"C:/Program Files/PTI/PSSE35/35.6/PSSPY37")
sys.path.insert(0,"C:/Program Files/PTI/PSSE35/35.6/PSSBIN")
case_file = "IEEE 39 bus.RAW"
dyr_file = "IEEE 39 bus.dyr"
for i in range(2):
import psse35
import psspy
psspy.psseinit(150_000)
ierr = psspy.read(0, case_file)
ierr = psspy.dyre_new([1, 1, 1, 1], dyr_file, "", "", "")
psspy.pssehalt_2()