| Exception | Python 2.4.1: /home/tgolden/bin/python Thu Nov 20 08:14:38 2008 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
| /web/script/tgolden/weekdaymasses.org.uk/weekdaymasses.cgi |
| 14 |
| 15 app = publish.Publisher (index_ui.IndexUI ()) |
| 16 app.read_config ("weekdaymasses.conf") |
| 17 app.setup_logs () |
| 18 app.publish_cgi () |
| app = <quixote.publish.Publisher instance>, app.publish_cgi = <bound method Publisher.publish_cgi of <quixote.publish.Publisher instance>> |
| /web/script/tgolden/weekdaymasses.org.uk/quixote/publish.py in publish_cgi(self=<quixote.publish.Publisher instance>) |
| 561 import msvcrt |
| 562 msvcrt.setmode(sys.__stdout__.fileno(), os.O_BINARY) |
| 563 self.publish(sys.__stdin__, sys.__stdout__, sys.__stderr__, os.environ) |
| 564 |
| 565 def publish_fcgi (self): |
| self = <quixote.publish.Publisher instance>, self.publish = <bound method Publisher.publish of <quixote.publish.Publisher instance>>, global sys = <module 'sys' (built-in)>, sys.__stdin__ = <open file '<stdin>', mode 'r'>, sys.__stdout__ = <open file '<stdout>', mode 'w'>, sys.__stderr__ = <open file '<stderr>', mode 'w'>, global os = <module 'os' from '/home/tgolden/lib/python2.4/os.pyc'>, os.environ = {'REDIRECT_UNIQUE_ID': 'tep700MTrTQAAGHuGEcAAAAA... 'gzip', 'UNIQUE_ID': 'tep700MTrTQAAGHuGEcAAAAA'} |
| /web/script/tgolden/weekdaymasses.org.uk/quixote/publish.py in publish(self=<quixote.publish.Publisher instance>, stdin=<open file '<stdin>', mode 'r'>, stdout=<open file '<stdout>', mode 'w'>, stderr=<open file '<stderr>', mode 'w'>, env={'REDIRECT_UNIQUE_ID': 'tep700MTrTQAAGHuGEcAAAAA... 'gzip', 'UNIQUE_ID': 'tep700MTrTQAAGHuGEcAAAAA'}) |
| 543 # Output results from Response object |
| 544 if output: |
| 545 request.response.set_body(output) |
| 546 try: |
| 547 request.response.write(stdout) |
| request = <quixote.http_request.HTTPRequest instance>, request.response = <quixote.http_response.HTTPResponse instance>, request.response.set_body = <bound method HTTPResponse.set_body of <quixote.http_response.HTTPResponse instance>>, output = <churches_ui.ChurchesDoc instance> |
| /web/script/tgolden/weekdaymasses.org.uk/quixote/http_response.py in set_body(self=<quixote.http_response.HTTPResponse instance>, body=<churches_ui.ChurchesDoc instance>) |
| 202 self.set_header('content-length', body.length) |
| 203 else: |
| 204 self.body = str(body) |
| 205 self.set_header('content-length', len(self.body)) |
| 206 if not self.headers.has_key('content-type'): |
| self = <quixote.http_response.HTTPResponse instance>, self.body = None, builtin str = <type 'str'>, body = <churches_ui.ChurchesDoc instance> |
| /web/script/tgolden/weekdaymasses.org.uk/doc.py in __str__(self=<churches_ui.ChurchesDoc instance>) |
| 137 |
| 138 def __str__ (self): |
| 139 return self.as_string () |
| 140 |
| 141 def _q_index (self, request): |
| self = <churches_ui.ChurchesDoc instance>, self.as_string = <bound method ChurchesDoc.as_string of <churches_ui.ChurchesDoc instance>> |
| /web/script/tgolden/weekdaymasses.org.uk/doc.py in as_string(self=<churches_ui.ChurchesDoc instance>) |
| 133 |
| 134 def as_string (self): |
| 135 text = self.header () + self._body () + self.footer () |
| 136 return text.encode (config.OUTPUT_ENCODING) |
| 137 |
| text undefined, self = <churches_ui.ChurchesDoc instance>, self.header = <bound method ChurchesDoc.header of <churches_ui.ChurchesDoc instance>>, self._body = <bound method ChurchesDoc._body of <churches_ui.ChurchesDoc instance>>, self.footer = <bound method ChurchesDoc.footer of <churches_ui.ChurchesDoc instance>> |
| /web/script/tgolden/weekdaymasses.org.uk/doc.py in _body(self=<churches_ui.ChurchesDoc instance>) |
| 127 |
| 128 if not body_text: |
| 129 body_text = self.body () |
| 130 utils.cache (self.request, body_text) |
| 131 |
| body_text = u'', self = <churches_ui.ChurchesDoc instance>, self.body = <bound method ChurchesDoc.body of <churches_ui.ChurchesDoc instance>> |
| /web/script/tgolden/weekdaymasses.org.uk/churches_ui.py in body(self=<churches_ui.ChurchesDoc instance>) |
| 38 if self.sort_keys: |
| 39 sortable = [] |
| 40 for church in self.churches (): |
| 41 sortable.append ([church[key] for key in self.sort_keys] + [church]) |
| 42 sortable.sort () |
| church = <Row: (609401, u'Sacred Heart (Italian Church)',...), 5000, None, None, datetime.date(2008, 1, 12))>, self = <churches_ui.ChurchesDoc instance>, self.churches = <bound method ChurchesDoc.churches of <churches_ui.ChurchesDoc instance>> |
| /web/script/tgolden/weekdaymasses.org.uk/churches_ui.py in churches(self=<churches_ui.ChurchesDoc instance>) |
| 32 |
| 33 def churches (self): |
| 34 for church in self.churches_iterator: |
| 35 yield church |
| 36 |
| church = <Row: (609401, u'Sacred Heart (Italian Church)',...), 5000, None, None, datetime.date(2008, 1, 12))>, self = <churches_ui.ChurchesDoc instance>, self.churches_iterator = <generator object> |
| /web/script/tgolden/weekdaymasses.org.uk/area_ui.py in churches_in_area(self=<area_ui.SpecificAreaUI instance>) |
| 84 |
| 85 def churches_in_area (self): |
| 86 for church in churches.churches_in_area (self.area.id): |
| 87 yield church |
| 88 |
| church = <Row: (609401, u'Sacred Heart (Italian Church)',...), 5000, None, None, datetime.date(2008, 1, 12))>, global churches = <module 'churches' from '/web/script/tgolden/weekdaymasses.org.uk/churches.py'>, churches.churches_in_area = <function churches_in_area>, self = <area_ui.SpecificAreaUI instance>, self.area = <Row: (134, u'outside-gb', u'Outside GB', 134, u...B', None, None, None, None, None, 0, None, None)>, self.area.id = 134 |
| /web/script/tgolden/weekdaymasses.org.uk/churches.py in churches_in_area(area_id=134) |
| 45 def churches_in_area (area_id): |
| 46 for c in database.select (u"SELECT DISTINCT church_id FROM area_day_church_masses WHERE area_id = ? AND church_id IS NOT NULL", [area_id]): |
| 47 yield church (id=c.church_id) |
| 48 |
| 49 def churches_near_postcode (outcode, distance, units): |
| global church = <function church>, builtin id = <built-in function id>, c = <Row: (609406,)>, c.church_id = 609406 |
| /web/script/tgolden/weekdaymasses.org.uk/churches.py in church(id=609406, full_name=None) |
| 13 def church (id=None, full_name=None): |
| 14 if id is not None: |
| 15 for row in database.select (u"SELECT id AS church_id, name AS church_name, * FROM churches WHERE id = ?", [int (id)]): |
| 16 return row |
| 17 elif full_name is not None: |
| row undefined, global database = <module 'database' from '/web/script/tgolden/weekdaymasses.org.uk/database.pyc'>, database.select = <function select>, builtin int = <type 'int'>, id = 609406 |
| /web/script/tgolden/weekdaymasses.org.uk/database.py in select(sql_statement=u'SELECT id AS church_id, name AS church_name, * FROM churches WHERE id = ?', params=[609406]) |
| 54 db.executemany (sql_statement, params) |
| 55 |
| 56 def select (sql_statement, params=()): |
| 57 for row in db.execute (sql_statement, params): |
| 58 yield row |
| row undefined, global db = <pysqlite2.dbapi2.Connection object>, db.execute = <built-in method execute of pysqlite2.dbapi2.Connection object>, sql_statement = u'SELECT id AS church_id, name AS church_name, * FROM churches WHERE id = ?', params = [609406] |
| /web/script/tgolden/weekdaymasses.org.uk/database.py in convert_decimal(s=',-66.118619') |
| 21 return decimal.Decimal (s.strip ()) |
| 22 except: |
| 23 raise Exception ("Problem converting %s" % s) |
| 24 sqlitex.sqlite.register_adapter (decimal.Decimal, adapt_decimal) |
| 25 sqlitex.sqlite.register_converter ("DECIMAL", convert_decimal) |
| builtin Exception = <class exceptions.Exception>, s = ',-66.118619' |
Exception: Problem converting ,-66.118619
args =
('Problem converting ,-66.118619',)