1

Use PSSPY with Multiple PSS/E Versions on Same Machine

Hello,

This is related to Thread 327, but I did not want to thread-jack.

I have been developing PSSPY scripts for my department and we run a mix of PSS/E v32 and v33, or a combination of the two. I have found that you must run PSSPY from the most recently installed version of PSS/E on your computer or you get an "unexepted version" error. I understand that Python 2.5 must be run for v32 and Python 2.7 for v33, that we can keep straight. For my development it would be really useful to test my scripts for 2.5/v32 and 2.7/v33 on the same machine. Has anyone found a solution for this? Thank you.

pwrguy's avatar
11
pwrguy
asked 2013-01-11 16:04:09 -0500, updated 2013-01-11 18:10:48 -0500
edit flag offensive 0 remove flag close merge delete

Comments

My situation is still unresolved even after using the code. For example, I have PSSE v31 and v32 installed on my machine. If I try and run v31 PSSPY I get the following error: "Bad revision number for program PSS(tm)E".

pwrguy's avatar pwrguy (2013-01-15 08:38:24 -0500) edit

Likewise my colleague has PSS/E v32 and v33 installed on his machine. If he tries to run v32 PSSPY he gets this error: "Bad version number 32 for program PSSE Was expecting 33" It seems that only the most recently installed version of PSS/E can use Python on top.

pwrguy's avatar pwrguy (2013-01-15 08:40:41 -0500) edit

**SOLUTION**. This problem was caused by not having write access to the registry location HKEY_LOCAL_MACHINE\SOFTWARE\PTI\Licence. PSSPY uses this to register Python with PSSE. Without write access, only the currently registered Python/PSSE pair can be run.

pwrguy's avatar pwrguy (2013-01-22 09:58:38 -0500) edit
add a comment see more comments

1 Answer

0

Hi there,

If I understand your requirement correctly then we had a similar problem for some scripts we wrote.

We needed a way to set up our Python scripts so that they could run on any version of PSSE (even if there were multiples installed on the same machine.)

@Daniel_Hillier and @chip wrote a library that deals with that problem. They open sourced it here: https://github.com/danaran/pssepath. You are most welcome to use it.

Here is how you would set the script to use PSSE32

import pssepath
pssepath.add_pssepath(32)

import psspy # continue as normal

and here is for PSSEv33

import pssepath
pssepath.add_pssepath(33)

import psspy

The script should work with any PSSE version. If you find any mistakes in the code, you can post them here, or even open a ticket on github.

JervisW's avatar
1.3k
JervisW
answered 2013-01-12 20:54:53 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks, Jervis. This is good work. I had to hard code in the Python and PSSE paths since we have limited access to the registry. I'll let you know how it goes.

pwrguy's avatar pwrguy (2013-01-15 08:35:10 -0500) edit

Perhaps we can find a way around accessing the registry if it causes you trouble. I'm always amazed at the number of different ways Windows can be configured!

JervisW's avatar JervisW (2013-01-15 16:29:54 -0500) edit
1

Jervis, I posted some code changes to Github to help solve half of my problems. 32/64-bit Windows has different registry locations.

pwrguy's avatar pwrguy (2013-01-29 14:46:51 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer