First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
Dear all,
i'm trying to run PSSE with Python automation from Matlab, but can anyone of the community please tell me if i'm doing this correctly?
I have a python file test.py containing the following lines:
import os,sys
PSSE_LOCATION = r'C:\Program Files (x86)\PTI\PSSEUniversity33\PSSBIN'
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' + PSSE_LOCATION
import psspy
and then follow the lines where i open a RAW file, and do power flow analysis**
then, in Matlab i use the command ! python test.py the exclamaton mark allows to run the command from the command line of the operating system.
However, this gives the error Traceback (most recent calls last): file "test.py" , line 8, in <module> import psspy 'Importerror', bad magic number in 'psspy': b'\x03\xf3\r\n'
Does anybody know how to correct this? Thanks!!!