| <type 'exceptions.IndexError'> | Python 2.6.2: /usr/local/bin/python Thu Sep 9 18:57:08 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.
| /home/moving/domains/move-4-less.info/public_html/new/genit.py in |
| 735 change = True |
| 736 openDict(cfg['dict']) |
| 737 pageSrc = reUpd(pageSrc) |
| 738 core.updKwd(doorName.encode('utf_8'),pageName.encode('utf_8'),0) |
| 739 else: |
| pageSrc = u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Str... Rights Reserved.</p>\r\n</div>\r\n</body>\r\n</html>\r\n', reUpd = <function reUpd at 0x31545f0> |
| /home/moving/domains/move-4-less.info/public_html/new/genit.py in reUpd(tmpl=u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Str... Rights Reserved.</p>\r\n</div>\r\n</body>\r\n</html>\r\n') |
| 597 zone = tmpl[i0:i1] |
| 598 new = zone.replace('<<','{').replace('>>','}') |
| 599 new = useTmpl(new) |
| 600 tmpl = tmpl.replace('{update}%s{/update}' % zone, '{update}%s{/update} \n %s' % (zone,new)) |
| 601 return tmpl |
| new = u'\r\n\t\t\t<div class="post">\r\n\t\t\t\t<h3 class="title">{...}/}</p>\r\n\t\t\t\t\t{/loop}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t', global useTmpl = <function useTmpl at 0x3154488> |
| /home/moving/domains/move-4-less.info/public_html/new/genit.py in useTmpl(tmpl=u'\r\n\t\t\t<div class="post">\r\n\t\t\t\t<h3 class="title">L...tive:1:4/}</p>\r\n\t\t\t\t\t\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t') |
| 509 break |
| 510 mode,count,fq = tmpl[i0:i1].split(':') |
| 511 tmpl = tmpl.replace('{text:%s:%s:%s/}' % (mode,count,fq),genText(int(count),mode,int(fq)),1) |
| 512 # use memory |
| 513 while 1: |
| tmpl = u'\r\n\t\t\t<div class="post">\r\n\t\t\t\t<h3 class="title">L...tive:1:4/}</p>\r\n\t\t\t\t\t\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t', tmpl.replace = <built-in method replace of unicode object at 0x38937b0>, mode = u'relative', count = u'3', fq = u'2', global genText = <function genText at 0x3152f50>, builtin int = <type 'int'> |
| /home/moving/domains/move-4-less.info/public_html/new/genit.py in genText(count=3, mode=u'relative', fq=2) |
| 175 sent = choice(dictry['SNTS']) |
| 176 if fmod(no,fq) == 0: |
| 177 sent = keyInTo(sent,mode) |
| 178 while 1: |
| 179 i0 = sent.find('{') + 1 |
| sent = u"{NN}'s {NN} is {VVN} for {VVG} the {NN} of {RB} {JJ} {NNS} and {NNS}.", global keyInTo = <function keyInTo at 0x3152ed8>, mode = u'relative' |
| /home/moving/domains/move-4-less.info/public_html/new/genit.py in keyInTo(sent=u"{NN}'s {NN} is {VVN} for {VVG} the {NN} of {RB} {JJ} {NNS} and {NNS}.", mode=u'relative') |
| 157 sent = sent.replace('.',', %s.' % check(keyword).lower()) |
| 158 else: |
| 159 sent = '%s, %s' % (check(upfirst(keyword)), sent) |
| 160 else: |
| 161 no = randint(0,100) |
| sent = u"{NN}'s {NN} is {VVN} for {VVG} the {NN} of {RB} {JJ} {NNS} and {NNS}.", global check = <function check at 0x3152e60>, global upfirst = <function upfirst at 0x31522a8>, keyword = u'' |
| /home/moving/domains/move-4-less.info/public_html/new/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 0x2ad2960425d0>, ].upper = <built-in method upper of unicode object at 0x2ad2960425d0> |
<type 'exceptions.IndexError'>: string index out of range
args =
('string index out of range',)
message =
'string index out of range'