--> --> KeyError Python 2.4.1: /usr/bin/python2.4 Wed Apr 4 03:06:23 2007 A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred. /home/anthony/svn/pyweek/trunk/lib/Http.py in wrapper(self=, *a=(), **kw={}) 21 """make exceptions appear in the browser instead of stderr""" 22 try: 23 original_function(self, *a, **kw) 24 except: 25 cgitb.Hook(display=1, logdir=None, context=5, format="html", original_function = , self = , a = (), kw = {} /home/anthony/svn/pyweek/trunk/lib/Http.py in do_GET(self=) 47 break 48 # Handle it! 49 urlHandler(self) 50 51 @pretty urlHandler = , self = /home/anthony/svn/pyweek/trunk/lib/game.py in play(request=) 39 room = world.world.getByName ("room404") 40 # And let's rock: 41 room.handleRequest (request) 42 request.avatar.save() 43 room = , room.handleRequest = >, request = /home/anthony/svn/pyweek/trunk/lib/room.py in handleRequest(self=, request=) 139 request.avatar.roomInfo[self.id]['choice'] = choice 140 self.__choice = choice 141 rv = self.__rooms[choice].handleRequest(request) 142 if request.path.endswith('/return'): 143 del request.avatar.roomInfo[self.id] rv undefined, self = , self.__rooms undefined, choice = 'M', ].handleRequest undefined, request = /home/anthony/svn/pyweek/trunk/lib/room.py in handleRequest(self=, request=) 139 request.avatar.roomInfo[self.id]['choice'] = choice 140 self.__choice = choice 141 rv = self.__rooms[choice].handleRequest(request) 142 if request.path.endswith('/return'): 143 del request.avatar.roomInfo[self.id] rv undefined, self = , self.__rooms undefined, choice = 0, ].handleRequest undefined, request = /home/anthony/svn/pyweek/trunk/lib/rooms/CombatRoom.py in handleRequest(self=, request=) 21 def handleRequest (self, request): 22 action = request.path.split ('/')[-1] 23 enemy = enemyFactory.getById (self.enemy) 24 avatar = request.avatar 25 if action == 'return': enemy undefined, global enemyFactory = , enemyFactory.getById = >, self = , self.enemy = 'irate_commode_patron' /home/anthony/svn/pyweek/trunk/lib/enemy.py in getById(self=, id='irate_commode_patron') 77 78 def getById (self, id): 79 return self.items[id] 80 81 enemyFactory = EnemyFactory() self = , self.items = {'4d_snack': , 'coworker_in_need': }, id = 'irate_commode_patron' KeyError: 'irate_commode_patron' args = ('irate_commode_patron',)