pssexcel.accc not working in GUI or via python in PSSE V34.7.0

asked 2021-08-19 00:22:40 -0500

Peter B gravatar image

updated 2021-08-19 01:04:31 -0500

Hi,

In PSS/E V34.7.0 I am having the following problems:

  • I cannot export ACCC results to Excel via the GUI.
  • I select Power flow -> Reports -> Export ACCC PV/PQ results to Excel...
  • and then nothing happens other than the message below in the progress window, there is no pop-up window to select the .acc file to extract data from etc.

Executing Python file:C:\Program Files (x86)\PTI\PSSE34\PSSPY27\excelexportw_frompsse.pyw

  • I therefore tried to see if I could extract the data from the .acc file using python code. My simple code is below

    accfilename = 'file_name.acc'
    xlsfilename = 'fileneme.xlsx'
    
    """Export results to excel"""
    import pssexcel
    
    # 's' or 'summary' ACCC Analysis Summary
    # 'e' or 'events' Contingency Events Description
    # 'b' or 'branch' Monitored Branch Flow (MVA)
    # 'i' or 'interface' Monitored Interface Flow (MW)
    # 'v' or 'voltage' Monitored Bus Voltage
    # 'l' or 'load' Loads Shed (MW)
    # 'g' or 'generator' Generator Dispatch (MW)
    # 'p' or 'phase shifter' Phase Shifter Angle
    
    options = ['s','e','b','v']  
    pssexcel.accc(accfile=accfilename, string=options, xlsfile=xlsfilename, ratecon = 'c', baseflowvio = True, basevoltvio = True, overloadreport = True)
    
  • Sometimes this works and creates an excel file like I used to be able to do via the GUI.

  • Sometimes, it starts to work, an excel file opens and starts to populate with data, but then crashes and gives the message below in the progress window in PSS/E (this is when it is trying to overwrite an existing excel file):

    File "Exportsresultsonly.py", line 25, in <module> pssexcel.accc(accfile=accfilename, string=options, xlsfile=xlsfilename, ratecon = 'c', baseflowvio = True, basevoltvio = True, overloadreport = True)

    File ".\pssexcel.py", line 1724, in accc    
    File ".\pssexcel.py", line 786, in _accc_co_events    
    File ".\excelpy.py", line 889, in set_active_sheet
    File "<COMObject <unknown>>", line 2, in Activate
    pywintypes.com_error: (-2146777998, 'OLE error 0x800ac472', None, None)
    
    • I get different errors if it creates a totally new excel file:

File "Exportsresultsonly.py", line 25, in <module>pssexcel.accc(accfile=accfilename, string=options, xlsfile=xlsfilename, ratecon = 'c', baseflowvio = True, basevoltvio = True, overloadreport = True)

File ".\pssexcel.py", line 1449, in accc
File ".\pssexcel.py", line 765, in _accc_summary
File ".\excelpy.py", line 446, in autofit_columns
File "<COMObject <unknown>>", line 2, in AutoFit
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 287, in _ApplyTypes_result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes) + args)
pywintypes.com_error: (-2147023170, 'The remote procedure call failed.', None, None)
  • I haven't been able to figure out the pattern of why the code sometimes work and sometimes doesn't.
  • Does anyone have any suggestions for what might be causing this problem and how to solve it? Or is there some other way to extract results from an .acc file?
edit retag flag offensive close merge delete