Ask Your Question
0

Using api "pssplot.channelfileexcelexport()" rasise error

asked 2018-05-18 08:01:39 -0500

AlexYang gravatar image

updated 2018-05-18 08:02:45 -0500

what I want: I want to export my .out file to Excel file by using [Run Automation File] button or python command.

what I do: I click Button [Start Recording], save a python file "out2excel.py". then I open my output file "t007.outx" in PSSE's GUI, and I right-click [t007] in left Plot Tree->Plot Data->Channel Files, then the corresponding excel window open successfully. I find api "pssplot.channelfileexcelexport()" is the key to export.out/.outx file to Excel file.

what error: When I restart PSSE, click [Run Automation File], select "out2excel.py" to do 'auto export' operation, some errors show in Output Bar:

  Call failed (result is null)
    Traceback (most recent call last):
      File ".\dyntools.py", line 2427, in _xlsout
      File ".\dyntools.py", line 1023, in __init__
      File ".\dyntools.py", line 351, in _outextract_data
      File ".\dyntools.py", line 321, in _outextract_id
    Exception: ERROR ... File c:\users\yang\documents\pti\psse34\test-ieee\1-9bus-test\t007.outx version is 1.47195436916e+19
        dyntools handles version 2.0 files only.

I copy python script: pssplot.channelfileexcelexport(r"""C:\Users\Yang\Documents\PTI\PSSE34\test-IEEE\1-9Bus-test\t007.outx""")to Command Line Input, the same error still exists.

My PSSE verion is v34, my python version is 2.7, and other automation operationlike 'open case data, do power flow solution' can be performed normally.

So how can I perform this api to export.out file to Excel file successfully? Thank you for helping.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2018-05-21 19:51:20 -0500

AlexYang gravatar image

updated 2018-05-21 20:01:02 -0500

This is my solution:

1.If you run simulation in PSSe GUI, you have to go for Dynamic -> Simulation options -> Simulation, check out [Extended file (support DVRM)] in Channel output file type before you create .out file(actually .outx file is available). Then you will find the .out file (or .outx file) can be read by dyntool.

2.If your simulation run outside the PSSe GUI like using python script, use:

psspy.set_chnfil_type(0)     # 1 for OUTX format, 0 for (old) OUT format
psspy.strt_2([0,1],outfile)  # create out file, .out/.outx file are available if type is 0
edit flag offensive delete link more
0

answered 2018-05-18 09:41:13 -0500

perolofl gravatar image

API channelfileexcelexport is using module dyntools for the export to Excel while performing the export interactively in PSSE seems to use some other software. The Excel books created by the two methods are not identical.

Your problem is that dyntools in your revision of PSSE don't support .outx files, only .out files. You have to either upgrade to version 34.4 or save the simulation results in the older .out format.

edit flag offensive delete link more

Comments

thanks! I have solved it.

AlexYang gravatar imageAlexYang ( 2018-05-20 03:53:00 -0500 )edit

How? can you post your code?

jconto gravatar imagejconto ( 2018-05-21 17:58: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

1 follower

Stats

Asked: 2018-05-18 08:01:39 -0500

Seen: 90 times

Last updated: May 21