Ask Your Question
-1

Problems with Python/PSSPY - new instalation PSSE v34

asked 2016-07-08 14:37:49 -0500

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.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2016-08-31 10:23:36 -0500

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.

edit flag offensive delete link more
0

answered 2016-07-13 13:35:07 -0500

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.

edit flag offensive delete link more

Comments

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

Cao Huy gravatar imageCao Huy ( 2016-08-09 02:03:25 -0500 )edit

@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 ( 2016-09-25 03:35:20 -0500 )edit
0

answered 2016-08-01 20:15:10 -0500

jconto gravatar image

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2016-07-08 14:37:49 -0500

Seen: 1,284 times

Last updated: Aug 31 '16