<type 'exceptions.IndexError'>
Python 2.6.6: /usr/bin/python
Sun Feb 5 15:30:16 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.

 /usr/lib/pymodules/python2.6/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object>)
  556         """Runs the handler, flushes the streams, and ends the request."""
  557         try:
  558             protocolStatus, appStatus = self.server.handler(self)
  559         except:
  560             traceback.print_exc(file=self.stderr)
protocolStatus undefined, appStatus undefined, self = <flup.server.fcgi_base.Request object>, self.server = <flup.server.fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <flup.server.fcgi.WSGIServer object>>
 /usr/lib/pymodules/python2.6/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': '', 'DOCUMENT_ROOT': '/usr/local/nginx/html', 'DOCUMENT_URI': '/oils/Summer_Susans/', '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', ...}, start_response = <function start_response>
 /var/www/lydiajohnston/py/urlhandler.py in handler(environ={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'DOCUMENT_ROOT': '/usr/local/nginx/html', 'DOCUMENT_URI': '/oils/Summer_Susans/', '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', ...}, 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 view_oil>, environ = {'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'DOCUMENT_ROOT': '/usr/local/nginx/html', 'DOCUMENT_URI': '/oils/Summer_Susans/', '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', ...}
 /var/www/lydiajohnston/py/views.py in view_oil(request_uri='/oils/Summer_Susans/', env={'CONTENT_LENGTH': '', 'CONTENT_TYPE': '', 'DOCUMENT_ROOT': '/usr/local/nginx/html', 'DOCUMENT_URI': '/oils/Summer_Susans/', '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', ...})
  107 def view_oil(request_uri,env):
  108   piecename =  request_uri[6:-1].replace("_"," ")
  109   piece = db.find_oil(piecename)
  110   if not piece: # no oil was found for name
  111     return fourohfour(request_uri)
piece undefined, global db = <module 'py.db' from '/var/www/lydiajohnston/py/db.pyc'>, db.find_oil = <function find_oil>, piecename = 'Summer Susans'
 /var/www/lydiajohnston/py/db.py in find_oil(oilname='Summer Susans')
   42 def find_oil(oilname):
   43   """ given a string that is the name of an oil, return the row from the db """
   44   oil = get_res(""" SELECT * FROM oils WHERE name = '%s'; """,(oilname,))[0]
   45   if len(oil) > 0: # some result was found
   46     return oil
oil undefined, global get_res = <function get_res>, oilname = 'Summer Susans'

<type 'exceptions.IndexError'>: list index out of range
      args = ('list index out of range',)
      message = 'list index out of range'