Ask Your Question
0

Dll load fail error when trying to import data from .out file to Microsoft Excel

asked Sep 24 '3

LassiPSSE gravatar image

updated Sep 24 '3

Hi all, I was trying to export data from channel outputs of my dynamic simulation, just by using the ' Export to Excel' option and following error appeared.

Call failed (result is null)

Traceback (most recent call last):

File ".\dyntools.py", line 1996, in _xlsout

File ".\dyntools.py", line 1084, in xlsout

File ".\dyntools.py", line 428, in xlsexport

File ".\excelpy.py", line 168, in <module>

File "C:\Python27\lib\site-packages\win32com_init_.py", line 5, in <module>

import win32api, sys, os

ImportError: DLL load failed: The specified procedure could not be found.

I think this is something related to the python version but can't figure out where the issue is. Can anyone please help me to resolve this issue or please propose me any other method to get my simulation data from .out files.

Comments

Maybe module win32api is missing. Try import win32api.

perolofl gravatar imageperolofl (Sep 24 '3)

Thank you very much for your reply. But I have no idea how to do it as I am not an expert in python or coding. Can you please explain me further how to do it.

LassiPSSE gravatar imageLassiPSSE (Sep 24 '3)

2 answers

Sort by » oldest newest most voted
0

answered Sep 26 '3

jconto gravatar image

Check if my reply to the post "I can not import psspy," applies to your case. In some PSSe installations, excelpy.pyc is missing, resulting in an error when trying to export to excel. Let me know your email if that is the case.

link

Comments

Thank you for your reply. I just referred the post 'I can not import psspy'. In my root PSSE directory, psspy.pyc is located in the PSSBIN directory. There's no any psspy.py in that directory. Neither psspy.pyc nor psspy.py are located in "\PSSPY27" directory as you had mentioned in the post.

LassiPSSE gravatar imageLassiPSSE (Sep 26 '3)

This is my email , lasindu.1992@gmail.com How about installing the latest version of 2.7.x (I think 2.7.18 is available) altogether with other required modules such as wxPython, pywin32, matplotlib, numpy etc?

LassiPSSE gravatar imageLassiPSSE (Sep 26 '3)

It is always good to install the latest version. can you confirm that excelpy.pyc is in the 'pssbin' root PSSE directory?

jconto gravatar imagejconto (Sep 27 '3)

excelpy.pyc is there in the 'pssbin' root PSSE directory.

LassiPSSE gravatar imageLassiPSSE (Sep 28 '3)

Having admin rights, install the latest version, at the default directories and accept the suggestions to install additional tools like win32. Go to the 'examples' folder in the PSSe installation folder and run test 1 in "dyntools_demo.py"

jconto gravatar imagejconto (Sep 28 '3)
0

answered Sep 24 '3

perolofl gravatar image

In PSSE API, go to "Command Line Input" window, select Python and enter "import win32api".

If import fails, check if file "C:\Python27\Lib\site-packages\win32\win32api.pyd" exists.

link

Comments

Hi, I tried this method but failed to import win32api and following error message was received. import win32api Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: DLL load failed: The specified module could not be found. Python Exception raised!

LassiPSSE gravatar imageLassiPSSE (Sep 25 '3)

Also, win32api.pyd exists in the above directory.

LassiPSSE gravatar imageLassiPSSE (Sep 25 '3)

Add directory C:\Python27\Lib\site-packages\win32 to the sys path.

perolofl gravatar imageperolofl (Sep 25 '3)

I did this . But still it doesn't work. Is it compulsory to install the default Python version ( 2.7.0) and other module versions given with original PSSE software package?

LassiPSSE gravatar imageLassiPSSE (Sep 26 '3)

How about installing the latest version of 2.7.x (I think 2.7.18 is available) altogether with other required modules such as wxPython, pywin32, matplotlib, numpy etc?

LassiPSSE gravatar imageLassiPSSE (Sep 26 '3)

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: Sep 24 '3

Seen: 1,816 times

Last updated: Sep 25 '23