--> --> -->
 
 
KeyError
Python 2.4.3: /usr/bin/python
Mon May 21 04:45:55 2012

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /srv/www/interser.it/cgi-bin/dispatch
   32         afk.debug("DISPATCHING URL: %s -> %s" % (url, mapped_url))
   33 
   34         data = dispatcher.serve_url(mapped_url, url_info)
   35 
   36         afk._exit()
data undefined, dispatcher = <module 'dispatcher' from '/srv/www/interser.it/lib/dispatcher.pyc'>, dispatcher.serve_url = <function serve_url>, mapped_url = 'prod.adp?lang=en&prod=ACTUATORS_AND_FLAME_CONTRO...rahma,_Landis&Gyr,_Honeywell..and_many_others)_70', url_info = {'url': '/prod.adp?lang=en&prod=ACTUATORS_AND_FLAME_CONTR...rahma,_Landis&Gyr,_Honeywell..and_many_others)_70'}
 /srv/src/afk/lib/dispatcher.py in serve_url(url='prod.adp?lang=en&prod=ACTUATORS_AND_FLAME_CONTRO...rahma,_Landis&Gyr,_Honeywell..and_many_others)_70', info={'url': '/prod.adp?lang=en&prod=ACTUATORS_AND_FLAME_CONTR...rahma,_Landis&Gyr,_Honeywell..and_many_others)_70'})
  391 
  392                                 afk.response.content_type = "text/html"
  393                                 data = afk._parse_adp(fname)
  394 
  395                         else:
data = '', global afk = <afk.AFK instance>, afk._parse_adp = <bound method AFK._parse_adp of <afk.AFK instance>>, fname = '/srv/www/interser.it/web/prod.adp'
 /srv/src/afk/lib/afk.py in _parse_adp(self=<afk.AFK instance>, fname='/srv/www/interser.it/web/prod.adp', env=None)
  279                         p = self.Parser(fname)
  280                         p.parse(fdata)
  281                         p.execute(env)
  282                 finally:
  283                         self.lang_stack.pop()
p = <afk.parser.Parser object>, p.execute = <bound method Parser.execute of <afk.parser.Parser object>>, env = None
 /srv/src/afk/lib/parser.py in execute(self=<afk.parser.Parser object>, env={'__builtins__': {'ArithmeticError': <class exceptions.ArithmeticError>, 'AssertionError': <class exceptions.AssertionError>, 'AttributeError': <class exceptions.AttributeError>, 'DeprecationWarning': <class exceptions.DeprecationWarning>, 'EOFError': <class exceptions.EOFError>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class exceptions.EnvironmentError>, 'Exception': <class exceptions.Exception>, 'False': False, 'FloatingPointError': <class exceptions.FloatingPointError>, ...}, 'afk': <afk.AFK instance>, 'common': <module 'common' from '/srv/www/interser.it/web/common.pyc'>, 'datetime': <module 'datetime' from '/usr/lib/python2.4/lib-dynload/datetime.so'>, 'lang': u'en', 'loc': u'/html/index.html#_mod=cms,mask=show_page,id_page=13,_lang=en', 'os': <module 'os' from '/usr/lib/python2.4/os.pyc'>, 'prod': {'created': datetime.datetime(2011, 6, 28, 23, 55, 28), 'html': u'', 'id': 13L, 'lang': u'en', 'modified': datetime.datetime(2011, 6, 29, 0, 7, 23), 'name': u'BODY PREPARATION', 'node_html': u'', 'node_name': u'BODY PREPARATION', 'node_text': u'', 'node_title': u'BODY PREPARATION', ...}, 'res': {'prod': {'created': datetime.datetime(2011, 6, 28, 23, 55, 28), 'html': u'', 'id': 13L, 'lang': u'en', 'modified': datetime.datetime(2011, 6, 29, 0, 7, 23), 'name': u'BODY PREPARATION', 'node_html': u'', 'node_name': u'BODY PREPARATION', 'node_text': u'', 'node_title': u'BODY PREPARATION', ...}}, 'sys': <module 'sys' (built-in)>, ...})
  118                         try:
  119                                 code = compile(self._out.getvalue(), self._name, 'exec')
  120                                 exec code in env
  121                         finally:
  122                                 os.chdir(curdir)
code = <code object ? at 0xb7e7c9e0, file "/srv/www/interser.it/web/prod.adp", line 3>, env = {'__builtins__': {'ArithmeticError': <class exceptions.ArithmeticError>, 'AssertionError': <class exceptions.AssertionError>, 'AttributeError': <class exceptions.AttributeError>, 'DeprecationWarning': <class exceptions.DeprecationWarning>, 'EOFError': <class exceptions.EOFError>, 'Ellipsis': Ellipsis, 'EnvironmentError': <class exceptions.EnvironmentError>, 'Exception': <class exceptions.Exception>, 'False': False, 'FloatingPointError': <class exceptions.FloatingPointError>, ...}, 'afk': <afk.AFK instance>, 'common': <module 'common' from '/srv/www/interser.it/web/common.pyc'>, 'datetime': <module 'datetime' from '/usr/lib/python2.4/lib-dynload/datetime.so'>, 'lang': u'en', 'loc': u'/html/index.html#_mod=cms,mask=show_page,id_page=13,_lang=en', 'os': <module 'os' from '/usr/lib/python2.4/os.pyc'>, 'prod': {'created': datetime.datetime(2011, 6, 28, 23, 55, 28), 'html': u'', 'id': 13L, 'lang': u'en', 'modified': datetime.datetime(2011, 6, 29, 0, 7, 23), 'name': u'BODY PREPARATION', 'node_html': u'', 'node_name': u'BODY PREPARATION', 'node_text': u'', 'node_title': u'BODY PREPARATION', ...}, 'res': {'prod': {'created': datetime.datetime(2011, 6, 28, 23, 55, 28), 'html': u'', 'id': 13L, 'lang': u'en', 'modified': datetime.datetime(2011, 6, 29, 0, 7, 23), 'name': u'BODY PREPARATION', 'node_html': u'', 'node_name': u'BODY PREPARATION', 'node_text': u'', 'node_title': u'BODY PREPARATION', ...}}, 'sys': <module 'sys' (built-in)>, ...}
 /srv/www/interser.it/web/prod.adp
   25 
   26 if prod:
   27         body = prod['main_text']
   28 else:
   29         body = open("static/products_%s.html" % (afk.session["lang"])).read()
body undefined, prod = {'created': datetime.datetime(2011, 6, 28, 23, 55, 28), 'html': u'', 'id': 13L, 'lang': u'en', 'modified': datetime.datetime(2011, 6, 29, 0, 7, 23), 'name': u'BODY PREPARATION', 'node_html': u'', 'node_name': u'BODY PREPARATION', 'node_text': u'', 'node_title': u'BODY PREPARATION', ...}

KeyError: 'main_text'
      args = ('main_text',)