Ask Your Question
0

Error on Dyntools xlsout

asked 2019-01-08 21:20:48 -0500

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

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2019-01-09 06:36:11 -0500

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)
edit flag offensive delete link more

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 ( 2019-01-09 22:12:27 -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: 2019-01-08 21:20:48 -0500

Seen: 750 times

Last updated: Jan 09 '19