Ask Your Question
0

psspy module not found in PSS/E 34

asked 2020-11-25 19:49:16 -0600

Pablo Burgos gravatar image

updated 2020-11-25 19:51:20 -0600

I am trying to use PSS / e Xplore 34 to perform small signal analysis, I open the .raw and .dyr files but when doing the analysis, I get this error:

Executing Python file:C:\Program Files (x86)\PTI\PSSEXplore34\PSSBIN\pssneva.py
Traceback (most recent call last):
File "C:\Program Files (x86)\PTI\PSSEXplore34\PSSBIN\pssneva.py", line 69, in <module>
os.environ['PATH'] += ';' + env_path_PSSE
NameError: name 'env_path_PSSE' is not defined
There may have been an issue running Python file:C:\Program Files (x86)\PTI\PSSEXplore34\PSSBIN\pssneva.py

I already did some research and it seems it's a bug in the pssneva.py code. Can't seem to define 'envpathPSSE'.

Help me please, I am attaching a part of the pssneva.py code where it marks the error.

from __future__ import print_function, division, with_statement
from shutil import copyfile
import os, sys, argparse, shutil, distutils.dir_util, errno, string

sys_path_PSSE=r'C:\Program Files (x86)\PTI\PSSEXplore34\PSSPY27'  #or where else you find the psspy.pyc
sys.path.append(sys_path_PSSE)
os_path_PSSE=r' C:\Program Files (x86)\PTI\PSSEXplore34\PSSBIN'  # or where else you find the psse.exe
os.environ['PATH'] += ';' + env_path_PSSE    #---->this is lile 69
import psspy
edit retag flag offensive close merge delete

Comments

You are referencing to env_path_PSSE (which is not defined) instead of os_path_PSSE!

perolofl gravatar imageperolofl ( 2020-11-26 01:50:22 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-12-01 10:20:11 -0600

likethevegetable gravatar image

updated 2020-12-01 20:03:29 -0600

You have a simple mislabeled variable error as perofl pointed out.

This is what I do, try the same but add this path "C:\Program Files (x86)\PTI\PSSEXplore34\PSSBIN\

pssbin34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSBIN'

psspy34 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY27'

psspy34py3 = r'C:\Program Files (x86)\PTI\PSSE34\PSSPY34'

path_psspy = paths.psspy34 # assume python 2

    if sys.version_info[0] >= 3:  # if using Python 3:
        path_psspy = paths.psspy34py3

    sys.path.insert(0, paths.pssbin34) # add psse dir to path, required for import psspy
    sys.path.insert(0, path_psspy)
    os.environ['PATH'] += ';' + paths.pssbin34  # this tells PSS/E where to find itself...
    os.environ['PATH'] += ';' + path_psspy
edit flag offensive delete link more

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

1 follower

Stats

Asked: 2020-11-25 19:49:16 -0600

Seen: 1,160 times

Last updated: Dec 01 '20