Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#8995 closed defect (duplicate)

IndexError: string index out of range

Reported by: shuge.lee@… Owned by:
Priority: highest Milestone:
Component: general Version: 0.12dev
Severity: blocker Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

如何重现

当进行 GET 操作于 /wiki/公司内部文档/learning/guestbook, Trac产生内部错误.

(请在此附加详细情况)

请求参数:

{'page': u'\u516c\u53f8\u5185\u90e8\u6587\u6863/learning/guestbook'}

系统信息

Trac 0.12dev-r9039
Python 2.5.4 (r254:67916, Nov 19 2009, 19:43:43)
[GCC 4.3.4]
setuptools 0.6
SQLite 3.5.9
pysqlite 2.4.1
Genshi 0.6dev-r1092
Babel 1.0dev-r482
mod_python 3.3.1
Pygments 1.2.2
Subversion 1.5.1 (r32289)
Docutils 0.6
jQuery 1.3.2

Enabled Plugins

TracWysiwyg 0.2-r7350
ZhTracGuideToc N/A

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r9039-py2.5.egg/trac/web/main.py", line 495, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r9039-py2.5.egg/trac/web/main.py", line 249, in dispatch
    content_type)
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r9039-py2.5.egg/trac/web/chrome.py", line 854, in render_template
    stream.render(method, doctype=doctype, out=buffer)
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/core.py", line 183, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/output.py", line 58, in encode
    for chunk in iterator:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/output.py", line 339, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/output.py", line 826, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/output.py", line 670, in __call__
    for kind, data, pos in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/output.py", line 771, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/output.py", line 586, in __call__
    for ev in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r9039-py2.5.egg/trac/web/chrome.py", line 939, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r9039-py2.5.egg/trac/web/chrome.py", line 928, in _generate
    for kind, data, pos in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/base.py", line 592, in _include
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/markup.py", line 380, in _match
    ctxt, start=idx + 1, **vars):
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/markup.py", line 380, in _match
    ctxt, start=idx + 1, **vars):
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/markup.py", line 330, in _match
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/base.py", line 532, in _flatten
    for kind, data, pos in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/base.py", line 592, in _include
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/markup.py", line 319, in _strip
    event = next()
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/base.py", line 532, in _flatten
    for kind, data, pos in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/base.py", line 592, in _include
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/markup.py", line 319, in _strip
    event = next()
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/base.py", line 552, in _flatten
    result = _eval_expr(data, ctxt, vars)
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/base.py", line 277, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/usr/lib/python2.5/site-packages/Genshi-0.6dev_r1092-py2.5.egg/genshi/template/eval.py", line 178, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "/home/trac/lj/.egg-cache/Trac-0.12dev_r9039-py2.5.egg-tmp/trac/wiki/templates/wiki_view.html", line 51, in <Expression u'wiki_to_html(context, page.text)'>
    ${wiki_to_html(context, page.text)}
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r9039-py2.5.egg/trac/wiki/formatter.py", line 1216, in format_to_html
    return HtmlFormatter(env, context, wikidom).generate(escape_newlines)
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r9039-py2.5.egg/trac/wiki/formatter.py", line 1171, in generate
    escape_newlines)
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r9039-py2.5.egg/trac/wiki/formatter.py", line 960, in format
    result = re.sub(self.wikiparser.rules, self.replace, line)
  File "/usr/lib/python2.5/re.py", line 150, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r9039-py2.5.egg/trac/wiki/formatter.py", line 904, in replace
    replacement = self.handle_match(fullmatch)
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r9039-py2.5.egg/trac/wiki/formatter.py", line 900, in handle_match
    return internal_handler(match, fullmatch)
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r9039-py2.5.egg/trac/wiki/formatter.py", line 784, in _table_cell_formatter
    alignleft = self.line[end] != ' '
IndexError: string index out of range

Attachments (0)

Change History (1)

comment:1 by Christian Boos, 15 years ago

Milestone: 0.12
Resolution: duplicate
Status: newclosed

Duplicate of #8977, please upgrade.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.