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

Ask Your Question
3

Bad Version number

asked Jul 16 '12

waltterval gravatar image

Hi, I try to run this script

import sys, os
sys.path.insert(0, r"C:\Program Files\PTI\PSSE33\PSSBIN")  # xx --> substitute xx with Version Number here.
os.environ['PATH'] = r"C:\Program Files\PTI\PSSE33\PSSBIN" + ";" + os.environ['PATH']
import redirect
redirect.psse2py()  # this redirects PSS(R)E progress, report output to Python Shell/Console
import psspy

CASE = r"H:\PortableAppscom\Documents\PSSE group\PSSPY\EMT_CAMax_SEP_12_Exp_PA_SN.sav"

psspy.psseinit(12000)
psspy.case(CASE)

But I got a pop up

"Bad version number 33 for program PSSE Was expecting 32"

I have installed both version.

Can you help me to find the problem?

Thanks, Waltter

Comments

@chip have you seen this error before?

JervisW gravatar imageJervisW (Jul 16 '12)
1

I've seen this trying to get my environment setup. Try *env > debug_env.txt* and search through the text file for an errant v32 reference. Remove the v32 references from your environment until your script starts working.

chip gravatar imagechip (Jul 17 '12)

I think this is because I installed the version 32 after the 33. Itried this script on another PC where I installer 32 before 33 and there is no problem. I'm going to reinstall the version 33

waltterval gravatar imagewaltterval (Jul 17 '12)

I think this is because I installed the version 32 after the 33. Itried this script on another PC where I installer 32 before 33 and there is no problem.

waltterval gravatar imagewaltterval (Jul 17 '12)

Well the error was fixed. I reinstalled the PSSE33, and now all is ok.

waltterval gravatar imagewaltterval (Jul 20 '12)

2 answers

Sort by » oldest newest most voted
1

answered Nov 7 '12

Enrique gravatar image

I had a similar experience and asked PTI support for help (before actually seeing the fix here, which was really helpful - thanks Waltter - since it got me going again until PTI got to the bottom of the problem).

Apparently PSSPY does some 'housekeeping' whenever it is imported. Part of this requires WRITE access to HKEY_LOCAL _MACHINE\SOFTWARE\PTI\License. Once my IT department granted WRITE access to this registry key I was able to uninstall\reinstall PSSE32 (getting back to the state where PSSE32 was installed after PSSE33) and no longer get the Bad Version Number error when following the above procedure of calling psspy.psseinit from outside PSSE.

Regards, Enrique

link

Comments

Thanks Enrique. I think the IT write permissions will be a stumbling block for many companies. Glad to have it documented for next time.

JervisW gravatar imageJervisW (Nov 7 '12)
1

answered Jul 20 '12

waltterval gravatar image

I fixed the error, the problem was that I intalled PSSE32 after PSEE33, so, I don't know why, mi PC always was looking PSSE32 as the default version. I reinstalled PSSE33 and I can run my script with no problem, even if I want to use PSSE32.

Regards, Waltter

link

Comments

nice one. Happy to see it fixed. So the answer is to install PSSE32 first and then PSSE33, not the other way around

JervisW gravatar imageJervisW (Jul 20 '12)

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

1 follower

Stats

Asked: Jul 16 '12

Seen: 1,089 times

Last updated: Nov 07 '12