| <type 'exceptions.IndexError'> | Python 2.5.5: /usr/bin/python2.5 Thu May 17 19:17:37 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.
| /var/www/shopping/data/www/weddingjewelry.21weddings.com/genit.py in |
| 720 tmplSrc = readTmpl('index') |
| 721 tmplSrc = indexTmpl(tmplSrc,doorName) |
| 722 pageSrc = useTmpl(tmplSrc) |
| 723 elif query.getvalue('q') == 'map': |
| 724 print 'Content-Type: text/html\n' |
| pageSrc undefined, useTmpl = <function useTmpl at 0x1b055f0>, tmplSrc = u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Str...d>\r\n</tr>\r\n</table>\r\n</div>\r\n</BODY>\r\n</HTML>\r\n\r\n' |
| /var/www/shopping/data/www/weddingjewelry.21weddings.com/genit.py in useTmpl(tmpl=u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Str...d>\r\n</tr>\r\n</table>\r\n</div>\r\n</BODY>\r\n</HTML>\r\n\r\n') |
| 364 break |
| 365 tmpl = tmpl.replace('{randword}',choice(relatives),1) |
| 366 tmpl = tmpl.replace('{randword:up}',upfirst(choice(relatives)),1) |
| 367 ## random number |
| 368 while 1: |
| tmpl = u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Str...d>\r\n</tr>\r\n</table>\r\n</div>\r\n</BODY>\r\n</HTML>\r\n\r\n', tmpl.replace = <built-in method replace of unicode object at 0x1b798d0>, global upfirst = <function upfirst at 0x1b04410>, global choice = <bound method Random.choice of <random.Random object at 0x1ac5910>>, global relatives = [u'wedding jewelry', u'bridal wedding jewelry', u'wedding jewelry sets', u'jewelry engagement & wedding', u'discount wedding jewelry', u'cheap wedding jewelry', u'wedding jewelry in tucson', u'wedding cake jewelry', u'wedding flower bouquet jewelry', u'wedding jewelry atlanta', u'cheap costume wedding jewelry', u'crystal and pearl costume wedding jewelry', u'wedding r bouquet jewelry', u'turquoise wedding jewelry fresnoca', u'western wedding jewelry', u'beaded wedding jewelry', u'cheap wedding jewelry set', u'crystal wedding jewelry los angeles', u'designer wedding jewelry', u'pearl wedding jewelry', ...] |
| /var/www/shopping/data/www/weddingjewelry.21weddings.com/genit.py in upfirst(string=u'') |
| 28 |
| 29 def upfirst(string): |
| 30 return string.replace(string[0],string[0].upper(),1) |
| 31 |
| 32 def dwfirst(string): |
| string = u'', string.replace = <built-in method replace of unicode object at 0x7f5792fd2270>, ].upper = <built-in method upper of unicode object at 0x7f5792fd2270> |
<type 'exceptions.IndexError'>: string index out of range
args =
('string index out of range',)
message =
'string index out of range'