Ask Your Question
1

Use PSSPY with Multiple PSS/E Versions on Same Machine

asked 2013-01-11 16:04:09 -0500

pwrguy gravatar image

updated 2013-01-11 18:10:48 -0500

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.

edit retag flag offensive 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 gravatar imagepwrguy ( 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 gravatar imagepwrguy ( 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 gravatar imagepwrguy ( 2013-01-22 09:58:38 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-01-12 20:54:53 -0500

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.

edit flag offensive delete link more

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 ( 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 gravatar imageJervisW ( 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 gravatar imagepwrguy ( 2013-01-29 14:46:51 -0500 )edit

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

Stats

Asked: 2013-01-11 16:04:09 -0500

Seen: 2,775 times

Last updated: Jan 12 '13