<type 'exceptions.IndexError'>
Python 2.6.5: /usr/bin/python
Sat Sep 4 21:20:38 2010

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 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/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': 'www.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': 'www.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 view_oil>, 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': 'www.lydiajohnston.com', ...}
 /var/www/lydiajohnston/py/views.py in view_oil(request_uri='/oils/August_Meadow/', 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': 'www.lydiajohnston.com', ...})
  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.py'>, db.find_oil = <function find_oil>, piecename = 'August Meadow'
 /var/www/lydiajohnston/py/db.py in find_oil(oilname='August Meadow')
   33 def find_oil(oilname):
   34   """ given a string that is the name of an oil, return the row from the db """
   35   oil = get_res(""" SELECT * FROM oils WHERE name='%s'; """ % oilname)[0]
   36   if len(oil) > 0: # some result was found
   37     return oil
oil undefined, global get_res = <function get_res>, oilname = 'August Meadow'

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