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

Ask Your Question
-1

Problems with Python/PSSPY - new instalation PSSE v34

asked Jul 8 '16

Chilon gravatar image

Hi everyone,

I have started using PSSE v34 from yesterday. I have problem with Python and module PSSPY. I can't use it normally, like in PSSE v33. I have wrote simple code:

import sys
import os
PSSE_PATH= r'C:\Program Files (x86)\PTI\PSSEXplore34\PSSPY27'
sys.path.append(PSSE_PATH)
os.environ['PATH'] = os.environ['PATH'] + ';' +  PSSE_PATH
import psspy
psspy.psseinit(8000)
psspy.solution_parameters_4([_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f, 0.001,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
psspy.nopf(0,1)
psspy.set_opf_report_subsystem(3,1)
print "TEST"

PSSE execute function "psspy.nopf(0,1)", but I can't use function "psspy.solutionparameters4" becouse I get back this information "Couldn't open Python file:C:\Users\Chilon\Desktop\testcode.py" Another problem is with the function "print". PSSE don't return any error and any text in Output Bar/Progress, it's clear.

Thanks for your help.

3 answers

Sort by » oldest newest most voted
0

answered Aug 31 '16

Chilon gravatar image

I used to use the PSS/E v34.00. I don't ran functions print. I installed version 34.02 and the problem ended. Everything works correctly. Thank you for your help.

link
0

answered Jul 13 '16

acd1 gravatar image

I would check a couple of things:

First, make sure when running the script in PSS/E that the Command Line Input has "Python" selected instead of "PSS/E Response".

Secondly, I believe the way you would print out text in PSS/E itself is with either psspy.report('TEST') or psspy.alert('TEST'). Try changing that and see if you get an output.

link

Comments

Haven't used PSSE v 34, but PSSE 33 respond well with print.

Cao Huy gravatar imageCao Huy (Aug 9 '16)

@Cao Huy: Dear Mr.Huy, I'm Phat, student at Ho Chi Minh City University of Technoly. I'm doing thesis related to PSS/E, Python and I think I need your help. Please give me your email or contact me: 41202668@hcmut.edu.vn. Regards!

Phat Huynh gravatar imagePhat Huynh (Sep 25 '16)
0

answered Aug 2 '16

jconto gravatar image

For standard v.34 users, check the post 'psspy module not found in PSS/E 34' to import psspy.

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

1 follower

Stats

Asked: Jul 8 '16

Seen: 1,375 times

Last updated: Aug 31 '16