trac-hacks/trac-mathjax

Auto-preview with [[math()]] macro in newticket page raises an internal server error

jun66j5 opened this issue · 1 comments

Latest of trac-mathjax with Trac 1.0.13.

11:19:10 PM Trac[main] ERROR: Internal Server Error: <RequestWithSession "POST '/newticket'">, referrer 'http://192.168.11.27:3000/trac-mathjax-tracenv/newticket'
Traceback (most recent call last):
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/trac/web/main.py", line 562, in _dispatch_request
    dispatcher.dispatch(req)
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/trac/web/main.py", line 269, in dispatch
    iterable=chrome.use_chunked_encoding)
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/trac/web/chrome.py", line 1115, in render_template
    encoding='utf-8')
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/core.py", line 183, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/output.py", line 58, in encode
    for chunk in iterator:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/output.py", line 339, in __call__
    for kind, data, pos in stream:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/output.py", line 826, in __call__
    for kind, data, pos in stream:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/output.py", line 670, in __call__
    for kind, data, pos in stream:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/output.py", line 771, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/output.py", line 586, in __call__
    for ev in stream:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/trac/web/chrome.py", line 1321, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/core.py", line 288, in _ensure
    for event in stream:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/trac/web/chrome.py", line 1310, in _generate
    for kind, data, pos in stream:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/template/base.py", line 605, in _include
    for event in stream:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/template/markup.py", line 327, in _match
    for event in stream:
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/template/base.py", line 565, in _flatten
    result = _eval_expr(data, ctxt, vars)
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/template/base.py", line 277, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/genshi/template/eval.py", line 178, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/trac/ticket/templates/ticket_box.html", line 128, in <Expression u'chrome_info_script(req)'>
    <py:if test="chrome_info_script">${chrome_info_script(req)}</py:if>
  File "/dev/shm/trac-mathjax/local/lib/python2.7/site-packages/trac/web/chrome.py", line 347, in chrome_info_script
    fragment.append(script['prefix'])
KeyError: 'prefix'
mitar commented

Care to make a pull request?