Ask Your Question

Python 2.3 on PSSE 30

asked 2012-05-06 23:37:16 -0500

anonymous user


The following is asked on behalf of @Fagundes I've migrated it from here:


I'm using PSS/E version 30 and using python 2.3 to program it. Can I use a newer version of python? Is it compatible? I use the code written by JervisW. The code written by me is:

import os,sys



os.environ['PATH'] = os.environ['PATH'] + ';' +  PSSE_LOCATION 

import psspy

print sys.path

Although python reports the following message:

Traceback (most recent call last):

  File "D:\ISEL\TESE\zTestes_python\Testes\", line 8, in -toplevel-
    import psspy

ImportError: DLL load failed: The specified module could not be found.

If I write the same code but without import pssy, python prints the following paths:


So he add the path of PSS/E. Can someone tell me what problem might be? I check for a psspy.dll and it exits. But there is no more files with the name psspy.

edit retag flag offensive close merge delete


I haven't got a copy of PSSE v 30 around to check this out. Does anyone else? Copying files from a later version of PSSE is unlikely to work because of the difference in Python version used.

jtrain gravatar imagejtrain ( 2012-05-06 23:41:01 -0500 )edit

3 answers

Sort by ยป oldest newest most voted

answered 2012-05-06 23:47:24 -0500

jtrain gravatar image

I read on Stack Overflow that you can use Dependency Walker on the psspyc.pyd file in the PSSBIN folder.

It should report on the required dlls so you can find which one is missing. It might be a simple problem with the PATH set up.

edit flag offensive delete link more


Well, in my file PSSBIN there isn't any psspyc.pyd so i guess some file are missing in my PSS30. I will check it out with my friends and see if they have those files.

Fagundes gravatar imageFagundes ( 2012-05-14 12:24:48 -0500 )edit

answered 2012-05-14 12:33:02 -0500

Fagundes gravatar image

updated 2012-05-15 00:08:40 -0500

JervisW gravatar image

Well, in my file PSSBIN there isn't any psspyc.pyd so i guess some files are missing in my PSS30. I will check it out with my friends and see if they have those files. Meanwhile, i try python 2.5 with PSS32 student version. Another error appears, i run the code and the follow message appears:

"Messages for api LIST

PSS(R)E not properly initialized"

Thus anyone knows how to solve this problem?

My code was:

import os,sys


os.environ['PATH'] = (r"D:\COMPONENTE_LOGICA\PTI\PSSEUniversity32\PSSBIN"+";"
                      + os.environ['PATH'])

import psspy

import redirect


edit flag offensive delete link more


Between the redirect.psse2py() and the psspy.fdns you will need the following:


That will firstly initialise PSSE, and then load a saved case.

JervisW gravatar imageJervisW ( 2012-05-15 00:10:42 -0500 )edit

It work perfectly with PSS/E V32. If i find how to do the same with PSS/E V30 I will post here in case anyone have the same problem.

Fagundes gravatar imageFagundes ( 2012-05-16 13:55:53 -0500 )edit

Great. I'd be pleased to find out about v30 too.

JervisW gravatar imageJervisW ( 2012-05-16 19:26:58 -0500 )edit

answered 2018-12-28 19:34:26 -0500

goodjkchoi gravatar image

updated 2018-12-28 21:07:45 -0500

try "import psspy" after add the following path, in which "dsusrnew.dll" exists, as belows

c:>set path=%path%;c:/program files (x86)/pti/psse30/psslib


import os os.environ['path'] += os.pathsep + 'c:/program files (x86)/pti/psse30/psslib'

I succeeded import psspy module without errors by this way.

edit flag offensive delete link more

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


Asked: 2012-05-06 23:37:16 -0500

Seen: 1,253 times

Last updated: Dec 28 '18