First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
The psspy
module isn't written in pure Python. It calls on the core PSSE code which was written in another language.
This means, there is a point in your program where Python isn't running at all, it's executing PSSE code (as in the accc
function). If there is an error deep inside accc
and PSSE doesn't correctly handle it, and return it to Python, then it can crash your program without reporting anything at all.
One technique I use is pdb
to step through line by line and check on the variables.
In your code, I'd put these lines just above your accc
function call
import pdb
pdb.set_trace()
Then you will be given an interactive Python prompt that looks like this (pdb)
where you can type any python code you like and step through the program line by line using the n
command for "next" and c
for continue until next breakpoint