A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
| /usr/lib/python2.6/site-packages/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object>, req=<flup.server.fcgi_base.Request object>) |
1116 try:
|
1117 try:
|
1118 result = self.application(environ, start_response)
|
1119 try:
|
1120 for data in result:
|
| result = None, self = <flup.server.fcgi.WSGIServer object>, self.application = <function handler>, environ = {'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'lydiajohnston.com', ...}, start_response = <function start_response> |
| /var/www/lydiajohnston/py/urlhandler.py in handler(environ={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'lydiajohnston.com', ...}, start_response=<function start_response>) |
8 for (url,func) in urls.urlmap:
|
9 if re.compile(url).search(environ['REQUEST_URI']):
|
10 returnval = func(environ['REQUEST_URI'], environ)
|
11 break;
|
12 if not returnval:
|
| returnval undefined, func = <function special>, environ = {'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'lydiajohnston.com', ...} |
| /var/www/lydiajohnston/py/views.py in special(request_uri='/special/2/', env={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'lydiajohnston.com', ...}) |
45 def special(request_uri,env):
|
46 pagenum = int(request_uri[9:-1])
|
47 oils = db.get_special_oils(pagenum)
|
48 if len(oils) == 0:
|
49 return fourohfour(request_uri)
|
| global oils = <function oils>, global db = <module 'py.db' from '/var/www/lydiajohnston/py/db.py'>, db.get_special_oils = <function get_special_oils>, pagenum = 2 |
| /var/www/lydiajohnston/py/db.py in get_special_oils(page=2) |
73 def get_special_oils(page):
|
74 """ gets all from the oils table that have a non-neg number in special_position, and page number as set column (tuple of tuples) """
|
75 return get_oils([ str(a['id']) for a in get_res(""" SELECT id FROM oils WHERE special_position!=-1 AND special_page!=-1 AND special_page=%d; """ % page) ], "special_position ASC")
|
76
|
77 def add_oil(name, width, height, page, position, special_page, special_position, filename, is_sold=0, is_print=0):
|
| global get_oils = <function get_oils>, builtin str = <type 'str'>, a undefined, global get_res = <function get_res>, page = 2 |
| /usr/lib/python2.6/site-packages/pgdb.py in execute(self=<pgdb.pgdbCursor object>, operation=' SELECT id FROM oils WHERE special_position!=-1 AND special_page!=-1 AND special_page=2; ', params=None) |
257 else:
|
258 # not a list of tuples
|
259 self.executemany(operation, (params,))
|
260
|
261 def executemany(self, operation, param_seq):
|
| self = <pgdb.pgdbCursor object>, self.executemany = <bound method pgdbCursor.executemany of <pgdb.pgdbCursor object>>, operation = ' SELECT id FROM oils WHERE special_position!=-1 AND special_page!=-1 AND special_page=2; ', params = None |
| /usr/lib/python2.6/site-packages/pgdb.py in executemany(self=<pgdb.pgdbCursor object>, operation=' SELECT id FROM oils WHERE special_position!=-1 AND special_page!=-1 AND special_page=2; ', param_seq=(None,)) |
287 self.rowcount = -1
|
288 except Error, msg:
|
289 raise DatabaseError("error '%s' in '%s'" % (msg, sql))
|
290 except Exception, err:
|
291 raise OperationalError("internal error in '%s': %s" % (sql, err))
|
| global DatabaseError = <class 'pg.DatabaseError'>, msg = ProgrammingError('ERROR: operator does not exis.... You might need to add explicit type casts.\n',), sql = ' SELECT id FROM oils WHERE special_position!=-1 AND special_page!=-1 AND special_page=2; ' |