First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

This is my first time conecting python with psseuniversity

asked May 2 '14

Luis gravatar image

After importing psspy module, I just want to open a saved case, on a file named "rede.sav".

The code is:

ierr = psspy.case("rede.sav")

and I got the msg "Messages for api CASE PSS(R)E not properly initialized (004288)"

with error code 4 which means "prerequisite requirements for API are not met"

What am I doing wrong?

1 answer

Sort by » oldest newest most voted
1

answered May 6 '14

Eli Pack gravatar image

Before you can open the case file, you'll need to add PSSE to your path and initialize it. You'll want to check the PSSBIN location in the code below (depending on your PSSE version and install location). I've given you a basic solve in the last line of code.

import os,sys

PSSE_LOCATION = r"C:\Program Files\PTI\PSSE32\PSSBIN"
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' +  PSSE_LOCATION 

import psspy

CASE = r"rede.sav"

psspy.psseinit(2000)
psspy.case(CASE)
psspy.fnsl()
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: May 2 '14

Seen: 893 times

Last updated: May 05 '14