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

Ask Your Question
0

Error on Dyntools xlsout

asked Jan 9 '19

haveityourwa gravatar image

Hey Guys, Have been trying to work on my process for extracting files into excel from PSSE. However after some time unsure if my installation is corrupt or what however I am now getting this error.

Traceback (most recent call last):
  File "C:/Dropbox/Power System Services/Scripts/New folder/PYTHON/2.7/PSSE Python Scripts/PSSE/General/DynDataExtractorBenchmarkingTeebar.py", line 129, in <module>
    achnf.xlsout(channels=signals, show=False, xlsfile=(PathDir + "\\sheets\\" + "Case_" + str(i+1) + '_2.xlsx'), outfile='', sheet ='', overwritesheet=True);
  File ".\dyntools.py", line 1084, in xlsout
  File ".\dyntools.py", line 428, in _xls_export
  File ".\excelpy.py", line 168, in <module>
  File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 11, in <module>
    import gencache
  File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 662, in <module>
    __init__()
  File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 56, in __init__
    _LoadDicts()
  File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 111, in _LoadDicts
    clsidToTypelib = p.load()
ValueError: insecure string pickle

Process finished with exit code 1

While working on one script it has now broken all of my scripts where this function(below) is used.

 achnf = dyntools.CHNF(outfile);
 achnf.xlsout(channels=signals, show=False, xlsfile=excel_file, outfile='', sheet ='', overwritesheet=True);

Have tried re installing PSSE V34 Excel python

Any help would be appreciated

1 answer

Sort by » oldest newest most voted
0

answered Jan 9 '19

jconto gravatar image

Review previous posts on "dyntools". Your code should run outside PSSE. Try:

 MyOUTVRSN = 0    #=0 for old out format; =1 for new outx format
achnf = dyntools.CHNF(outfile,outvrsn=MyOUTVRSN)
link

Comments

Hey I was running outside of PSSE, turns out my PYWIN32 library was having some issues. Thanks for this though didn't know that you could set the out version inside dyntools. Unsure what I should mark as the answer.

haveityourwa gravatar imagehaveityourwa (Jan 10 '19)

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: Jan 9 '19

Seen: 811 times

Last updated: Jan 09 '19