Ask Your Question
0

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

asked 2023-09-24 05:25:54 -0600

LassiPSSE gravatar image

updated 2023-09-24 05:30:57 -0600

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.

edit retag flag offensive close merge delete

Comments

Maybe module win32api is missing. Try import win32api.

perolofl gravatar imageperolofl ( 2023-09-24 06:03:33 -0600 )edit

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 ( 2023-09-24 10:17:39 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2023-09-25 20:21:00 -0600

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.

edit flag offensive delete link more

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 ( 2023-09-26 04:52:32 -0600 )edit

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 ( 2023-09-26 04:53:02 -0600 )edit

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 ( 2023-09-27 09:18:57 -0600 )edit

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

LassiPSSE gravatar imageLassiPSSE ( 2023-09-28 11:08:55 -0600 )edit

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 ( 2023-09-28 14:35:22 -0600 )edit
0

answered 2023-09-24 11:17:52 -0600

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.

edit flag offensive delete link more

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 ( 2023-09-24 22:58:43 -0600 )edit

Also, win32api.pyd exists in the above directory.

LassiPSSE gravatar imageLassiPSSE ( 2023-09-24 22:59:56 -0600 )edit

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

perolofl gravatar imageperolofl ( 2023-09-25 01:43:44 -0600 )edit

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 ( 2023-09-26 04:31:56 -0600 )edit

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 ( 2023-09-26 04:32:23 -0600 )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: 2023-09-24 05:25:54 -0600

Seen: 1,732 times

Last updated: Sep 25 '23