First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
this is more of a follow up question: I am getting the following error with your code:
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
====================== RESTART: C:\Python27\program1.py ======================
Traceback (most recent call last):
File "C:\Python27\program1.py", line 7, in <module>
import psspy
ImportError: No module named psspy
I copied and pasted your code and only added 1 single line and adjusted the path:
import os,sys
PSSE_LOCATION = r"C:\Program Files (x86)\PTI\PSSEXplore34\PSSBIN"
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' + PSSE_LOCATION
import psspy
psspy.psseinit(50)
What am I missing? FYI I do not have a psspy.py in that directory, but do have psspy.pyc and psspyc.pvd in: C:\Program Files (x86)\PTI\PSSEXplore34\PSSPY27
When I run with that path i get the following error:
====================== RESTART: C:\Python27\program1.py ======================
Traceback (most recent call last):
File "C:\Python27\program1.py", line 7, in <module>
import psspy
File ".\psspy.py", line 56, in <module>
ImportError: DLL load failed: The specified module could not be found.
I find both rather confusing and offering little in the way of help with their error messages. Am I missing a DLL file or more, or is psspy just no longer provided with PSSEXplore?