First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Hello everyone,
I want to use python in VS code to control PSS/E, but I can not import psse34 and psspy in python. Could anyone please help me solve the problem? I already try most of the python coding from this forum.
The following is my python code:
> import os, sys
> PSSE_LOCATION = r"C:\\Program Files(x86)\\PTI\\PSSE34\\PSSPY27"
> sys.path.append(PSSE_LOCATION)
> os.environ['PATH'] = os.environ['PATH'] + ';' + PSSE_LOCATION
>
> import psse34
> import psspy
Then, VScode gave the error as:
> import psse34
> File "C:\\Program Files(x86)\\PTI\\PSSE34\\PSSPY27\psse34.py", line 21, in "module"
> import os, psseloc
> ImportError: bad magic number in 'psseloc': b'\x03\xf3\r\n'