--> --> -->
 
 
<type 'exceptions.UnboundLocalError'>
Python 2.5.2: /usr/bin/python
Fri Mar 12 18:19:51 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.

 /www/www.casualhacker.net/docroot/cgi-bin/picindex.py in ()
  304     print "Content-type: text/html"
  305     print
  306     print html
  307 
  308 main()
main = <function main at 0xb7cc064c>
 /www/www.casualhacker.net/docroot/cgi-bin/picindex.py in main()
  300         filter = ""
  301 
  302     html = picindex(path[len(public_html):], rec, filter)
  303 
  304     print "Content-type: text/html"
html undefined, global picindex = <function picindex at 0xb7cc05a4>, path = '/www/www.casualhacker.net/docroot/album/2005/07-Honeymoon/img_2999.html', builtin len = <built-in function len>, global public_html = '/www/www.casualhacker.net/docroot/', rec = 0, filter = ''
 /www/www.casualhacker.net/docroot/cgi-bin/picindex.py in picindex(relative_path='album/2005/07-Honeymoon/img_2999.html', recurse=0, filter='')
  179         return dir_index(relative_path, recurse, filter)
  180     else:
  181         return pic_view(relative_path)
  182 
  183 def dir_index(relative_path, recurse=0, filter=""):
global pic_view = <function pic_view at 0xb7cc0614>, relative_path = 'album/2005/07-Honeymoon/img_2999.html'
 /www/www.casualhacker.net/docroot/cgi-bin/picindex.py in pic_view(relative_path='album/2005/07-Honeymoon/img_2999.html')
  236     html.append("<tr>")
  237     html.append("<td>")
  238     if index > 0:
  239         html.append('<a href="%s/%s/%s">' % 
  240                     (picindex_url, dir, entries[index-1].name))
index undefined

<type 'exceptions.UnboundLocalError'>: local variable 'index' referenced before assignment
      args = ("local variable 'index' referenced before assignment",)
      message = "local variable 'index' referenced before assignment"