[SOLVED] Cannot load psscommon
When running my code, I get this traceback. This is only on PSSE 34.9.4 and 32 bit Python 3.9.13, using 32 bit Python 2.7.18 and PSSE 34.9.4 works just fine.
PS C:\Users\path> .\run.bat
Traceback (most recent call last):
File "C:\Users\path\program.py", line 26, in <module>
import psspy
File ".\psspy.py", line 56, in <module>
ImportError: DLL load failed while importing psscommon: The specified module could not be found.
I have done all the importing and path setting with this code.
import sys, os
PSSE_LOCATION = r'''C:\Program Files (x86)\PTI\PSSE34\PSSPY39'''
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] + ';' + PSSE_LOCATION
import psspy
The part that confuses me is that the file psspy.pyc
and psscommon.pyd
are both in the folder added to the path.