Ask Your Question
1

Import psspy returns error: DLL load failed

asked 2023-10-24 19:34:15 -0500

Shahab Mehraeen gravatar image

updated 2023-10-25 09:54:24 -0500

jconto gravatar image

I have installed PSS34. The installation GUI has installed Python 2.7 and I have included that address in my code.

import os
import sys
import xlwt
import xlrd
import scipy.io

# Importing the psspy run PSSE
PSSE_LOCATION = r"C:\Program Files (x86)\PTI\PSSEXplore34\PSSPY27"
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' + PSSE_LOCATION
print('sys.path')
import psspy

The Python code is called within MATLAB and psspy.pyc exists in PSSPY27 folder. But it returns the following error:

File ".\psspy.py", line 56, in <module> ImportError: DLL load failed: The specified module could not be found.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2023-10-25 09:58:37 -0500

jconto gravatar image

can you run the same scripts outside matlab? Just open a DOS windows using the link "PSSE 34 Command Prompt" and run it.

My guess is that psspy cannot run within the matlab environment.

edit flag offensive delete link more

Comments

Yes, I tried and it gives the same error. I installed the same package on a different computer and there was no error.

Shahab Mehraeen gravatar imageShahab Mehraeen ( 2023-10-25 13:42:09 -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: 2023-10-24 19:34:15 -0500

Seen: 189 times

Last updated: Oct 25 '23