Edgewall Software
Modify

Opened 5 years ago

Closed 4 years ago

#12333 closed defect (fixed)

TypeError: expected string or buffer

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.12
Component: timeline Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Fix TypeError when [[Image]] in heading.

API Changes:
Internal Changes:

Description

Found in the logs:

[pid 29754 140573412329216] 2015-12-23 06:41:26,292 Trac[main] ERROR: Internal Server Error: <RequestWithSession "GET '/timeline?from=2007-12-07T21%3A32%3A54%2B01%3A00&precision=second'">, referrer 'http://trac.edgewall.org/browser/tags/trac-0.11'
Traceback (most recent call last):
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/web/main.py", line 594, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/web/main.py", line 271, in dispatch
    iterable=chrome.use_chunked_encoding)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/web/chrome.py", line 1153, in render_template
    encoding='utf-8')
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/core.py", line 184, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/output.py", line 58, in encode
    for chunk in iterator:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/output.py", line 350, in __call__
    for kind, data, pos in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/output.py", line 829, in __call__
    for kind, data, pos in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/output.py", line 669, in __call__
    for kind, data, pos in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/output.py", line 774, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/output.py", line 594, in __call__
    for ev in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/web/chrome.py", line 1402, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/web/chrome.py", line 1391, in _generate
    for kind, data, pos in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/filters/transform.py", line 706, in _unmark
    for mark, event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/filters/transform.py", line 1101, in __call__
    for mark, event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/filters/transform.py", line 118, in __iter__
    event = self.stream.next()
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/filters/transform.py", line 734, in __call__
    for mark, event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/filters/transform.py", line 702, in _mark
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/base.py", line 618, in _include
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/markup.py", line 378, in _match
    ctxt, start=idx + 1, **vars):
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/markup.py", line 326, in _match
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/base.py", line 558, in _flatten
    for kind, data, pos in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/base.py", line 618, in _include
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/markup.py", line 326, in _match
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/markup.py", line 315, in _strip
    event = next()
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/base.py", line 558, in _flatten
    for kind, data, pos in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/base.py", line 618, in _include
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/markup.py", line 315, in _strip
    event = next()
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/base.py", line 558, in _flatten
    for kind, data, pos in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/core.py", line 289, in _ensure
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/path.py", line 588, in _generate
    subevent = next()
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/base.py", line 618, in _include
    for event in stream:
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/markup.py", line 315, in _strip
    event = next()
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/base.py", line 578, in _flatten
    result = _eval_expr(data, ctxt, vars)
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/base.py", line 289, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "/usr/local/virtualenv/src/trac-1.1dev/.eggs/Genshi-0.7-py2.7-linux-x86_64.egg/genshi/template/eval.py", line 177, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/timeline/templates/timeline.html", line 63, in <Expression u"event.render('description', context)">
    ${event.render('description', context)}
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/timeline/web_ui.py", line 379, in <lambda>
    provider.render_timeline_event(context, field, event)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/ticket/web_ui.py", line 418, in render_timeline_event
    return descr + format_to(self.env, None, t_context, message)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1575, in format_to
    return format_to_oneliner(env, context, wikidom, **options)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1591, in format_to_oneliner
    return InlineHtmlFormatter(env, context, wikidom).generate(shorten)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1567, in generate
    shorten)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1423, in format
    result = re.sub(self.wikiparser.rules, self.replace, result)
  File "/usr/lib/python2.7/re.py", line 151, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1239, in replace
    replacement = self.handle_match(fullmatch)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1235, in handle_match
    return internal_handler(match, fullmatch)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 785, in _macrolink_formatter
    return self._macro_formatter(match, fullmatch, macro)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1387, in _macro_formatter
    if macro.is_inline(args):
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/formatter.py", line 380, in is_inline
    return self.inline_check(text)
  File "/usr/local/virtualenv/1.1dev/lib/python2.7/site-packages/trac/wiki/macros.py", line 523, in is_inline
    in self._split_args_re.split(content)[1::2]]
TypeError: expected string or buffer

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 5 years ago

content	None
self	<Component trac.wiki.macros.ImageMacro>

Can be reproduced with:

= [[Image]]

comment:2 by Ryan J Ollos, 5 years ago

Milestone: 1.0.101.0.11

comment:3 by Ryan J Ollos, 4 years ago

Milestone: 1.0.111.0.12

comment:4 by Ryan J Ollos, 4 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Fix committed to 1.0-stable in [14774], merged to trunk in [14775].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos 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.