Ask Your Question
0

Error using python to apply bus fault

asked 2017-03-27 21:20:26 -0500

Cynthia Hsu gravatar image

This is the code I use:

psspy.dist_bus_fault_2(201,1,0.0,[1,1,201,1],[0.0,-2.0E11,0.0,0.0,0.0,0.0])

But when I run this code, PSSE reply:

TypeError: function takes exactly 4 arguments (5 given)

But I read the API Document(Page 1432/2366:4.13.8 DISTBUSFAULT_2) it says:

Python syntax: ierr = distbusfault_2(ibus, units, basekv, options, values)

5 arguments are given in this function, and I don't know how to handle this problem, could anyone help me? Thanks a lot!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-03-28 12:11:32 -0500

jconto gravatar image

updated 2017-03-28 13:49:49 -0500

In PSSe v34, you can use [ignoring first var, ibus]:

psspy.dist_bus_fault_2(1,0.0,[1,1,201,1],[0.0,-2.0E11,0.0,0.0,0.0,0.0])

In PSSe v.33, it give me another error: "AttributeError: 'module' object has no attribute 'distbusfault_2'"

but it works using the previous form: psspy.dist_bus_fault(201,1, 13.3,[0.0,-0.2E+10])

edit flag offensive delete link more

Comments

I use the version PSSExplore 34, and your answer greatly address the problem! Thank you so much for your always useful help!

Cynthia Hsu gravatar imageCynthia Hsu ( 2017-04-01 02:10:38 -0500 )edit

Hi! Can you please explain what are the parameters required in the command dist_bus_fault2_()? For some weird reason, my PSS/E 34 has broken/outdated documentation files. I have the 33.9 API manual, but the software for 34.0.

Aryan Ritwajeet Jha gravatar imageAryan Ritwajeet Jha ( 2021-09-09 05:51:40 -0500 )edit

Re-install back PSSe to get a clean install. Maybe upgrade? Go to the PSSe folder and into the DOCS folder and open the LaunchPage.pdf, then select the API and search for "dist_bus_fault". In V.34.7 there is a "_3" version.

jconto gravatar imagejconto ( 2021-09-09 08:43:30 -0500 )edit

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

Stats

Asked: 2017-03-27 21:20:26 -0500

Seen: 384 times

Last updated: Mar 28 '17