CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   SU2 KeyError: 'SU2_RUN' (https://www.cfd-online.com/Forums/su2/134446-su2-keyerror-su2_run.html)

M.B April 29, 2014 18:04

SU2 KeyError: 'SU2_RUN'
 
The error I keep getting occurs when I try to run one of the python scripts within SU2. I've been working through the user tutorials and in Tutorials 2 & 7 where scripts are an option to execute problem. The scripts I've tried to use so far are parallel_computation.py and shape_optimization.py. I get mainly a KeyError: 'SU2_RUN', but have had a few TypeError: NoneType. Note the C++ modules run perfectly fine for me when called directly on their own.

I'm running Windows 7 64 bit, SU2 V3.0, Python 2.7.2. I've followed the windows installation guide all the way through and have tried a few re-installs to see if that fixes my issue, as well as different directories, and re-doing all the system environment variables required. Anything I've tried so far hasn't fixed it, so any help/ideas would be greatly appreciated!

Please see the errors below.

Code:

C:\SU2>parallel_computation.py -f inv_ONERAM6.cfg -p 4
Traceback (most recent call last):
  File "C:\SU2\parallel_computation.py", line 25, in <module>
    sys.path.append(os.environ['SU2_RUN'])
  File "C:\Python27\lib\os.py", line 423, in __getitem__
    return self.data[key.upper()]
KeyError: 'SU2_RUN'

Code:

C:\SU2>python shape_optimization.py f rot_NACA0012.cfg
Traceback (most recent call last):
  File "shape_optimization.py", line 25, in <module>
    sys.path.append(os.environ['SU2_RUN'])
  File "C:\Python27\lib\os.py", line 423, in __getitem__
    return self.data[key.upper()]
KeyError: 'SU2_RUN'

Code:

C:\SU2>parallel_computation.py -f inv_ONERAM6.cfg -p 4
Traceback (most recent call last):
  File "C:\SU2\parallel_computation.py", line 26, in <module>
    import SU2
  File "C:\SU2\SU2\__init__.py", line 13, in <module>
    if 'libedit' in readline.__doc__:
TypeError: argument of type 'NoneType' is not iterable


rktchip April 29, 2014 18:14

python is looking for an environment variable called SU2_RUN. you'll need to add this to your system. check out step two of these instructions -

http://adl-public.stanford.edu/docs/...s+Installation

M.B April 29, 2014 18:33

No worries, I did actually have SU2_RUN as a system variable already. I added it as a local user variable as well and I'm no longer seeing the KeyError. I'm now getting this TypeError every time I try to execute a script.

Code:

C:\SU2>python shape_optimization.py -f rot_NACA0012.cfg
Traceback (most recent call last):
  File "shape_optimization.py", line 26, in <module>
    import SU2
  File "C:\SU2\SU2\__init__.py", line 13, in <module>
    if 'libedit' in readline.__doc__:
TypeError: argument of type 'NoneType' is not iterable

Code:

C:\SU2>parallel_computation.py -f inv_ONERAM6.cfg -p 4
Traceback (most recent call last):
  File "C:\SU2\parallel_computation.py", line 26, in <module>
    import SU2
  File "C:\SU2\SU2\__init__.py", line 13, in <module>
    if 'libedit' in readline.__doc__:
TypeError: argument of type 'NoneType' is not iterable


rktchip May 7, 2014 03:43

doh, that's the code that adds tab-complete when working interactively. you can go into that file (SU2/SU2/__init__.py) and remove all lines after line 10. we'll fix this for the next release


All times are GMT -4. The time now is 03:42.