CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

SU2 KeyError: 'SU2_RUN'

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By rktchip

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2014, 18:04
Default SU2 KeyError: 'SU2_RUN'
  #1
M.B
New Member
 
Join Date: Apr 2014
Posts: 2
Rep Power: 0
M.B is on a distinguished road
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
M.B is offline   Reply With Quote

Old   April 29, 2014, 18:14
Default
  #2
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
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
wangqi198877 likes this.
rktchip is offline   Reply With Quote

Old   April 29, 2014, 18:33
Default
  #3
M.B
New Member
 
Join Date: Apr 2014
Posts: 2
Rep Power: 0
M.B is on a distinguished road
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
M.B is offline   Reply With Quote

Old   May 7, 2014, 03:43
Default
  #4
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
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
rktchip is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pointwise-SU2 joint webinar (April 29th) and SU2 v3.1.0 new release fpalacios SU2 News & Announcements 1 April 30, 2014 02:40
Official release of SU2 V3.0 and SU2 Educational V1.0 fpalacios SU2 News & Announcements 2 January 22, 2014 05:28
SU2 suite has moved to GitHub! fpalacios SU2 News & Announcements 0 August 12, 2013 02:07
Welcome to the Stanford University Unstructured (SU2) forum! economon SU2 0 January 7, 2013 02:48
New SU2 Forum Opened at CFD Online pete Site News & Announcements 0 January 5, 2013 17:59


All times are GMT -4. The time now is 23:52.