3

Bad Version number

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

waltterval's avatar
155
waltterval
asked 2012-07-16 17:09:31 -0500
edit flag offensive 0 remove flag close merge delete

Comments

@chip have you seen this error before?

JervisW's avatar JervisW (2012-07-16 17:33:09 -0500) edit
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's avatar chip (2012-07-16 20:44:43 -0500) edit

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's avatar waltterval (2012-07-16 23:57:59 -0500) edit

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's avatar waltterval (2012-07-16 23:58:01 -0500) edit

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

waltterval's avatar waltterval (2012-07-20 09:48:06 -0500) edit
add a comment see more comments

2 Answers

1

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

Enrique's avatar
71
Enrique
answered 2012-11-07 17:47:20 -0500
edit flag offensive 0 remove flag delete 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's avatar JervisW (2012-11-07 18:42:42 -0500) edit
add a comment see more comments
1

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

waltterval's avatar
155
waltterval
answered 2012-07-20 10:46:04 -0500
edit flag offensive 0 remove flag delete 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's avatar JervisW (2012-07-20 16:32:28 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer