First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
1

Use PSSPY with Multiple PSS/E Versions on Same Machine

asked Jan 11 '13

pwrguy gravatar image

updated Jan 12 '13

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.

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 gravatar imagepwrguy (Jan 15 '13)

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 gravatar imagepwrguy (Jan 15 '13)

**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 gravatar imagepwrguy (Jan 22 '13)

1 answer

Sort by » oldest newest most voted
0

answered Jan 13 '13

JervisW gravatar image

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.

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 gravatar imagepwrguy (Jan 15 '13)

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 gravatar imageJervisW (Jan 15 '13)
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 gravatar imagepwrguy (Jan 29 '13)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Jan 11 '13

Seen: 2,878 times

Last updated: Jan 12 '13