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/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', ...} |