Edgewall Software

Ticket #7684 (closed defect: fixed)

Opened 3 months ago

Last modified 6 weeks ago

Render error on error pages and wiki edits

Reported by: Daniel Nauck <dna@…> Owned by:
Priority: high Milestone: 0.12
Component: rendering Version: 0.12dev
Severity: normal Keywords: genshi051
Cc: info@…

Description

I got the folling error with Trac 0.12dev-r7556.

My Environment:

Trac:  	0.12dev-r7556
Python: 	2.5.1 (r251:54863, Jul 31 2008, 23:20:23) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)]
setuptools: 	0.6c6
SQLite: 	3.4.2
pysqlite: 	2.3.4
Genshi: 	0.5.1
mod_python: 	3.3.1
Pygments: 	0.8.1
Subversion: 	1.4.4 (r25188)
jQuery:	1.2.6

Traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r7556-py2.5.egg/trac/web/api.py", line 373, in send_error
    data, 'text/html')
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r7556-py2.5.egg/trac/web/chrome.py", line 719, in render_template
    return stream.render(method, doctype=doctype)
  File "build/bdist.linux-i686/egg/genshi/core.py", line 179, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "build/bdist.linux-i686/egg/genshi/output.py", line 60, in encode
    return _encode(u''.join(list(iterator)))
  File "build/bdist.linux-i686/egg/genshi/output.py", line 311, in __call__
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/output.py", line 753, in __call__
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/output.py", line 592, in __call__
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/output.py", line 698, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "build/bdist.linux-i686/egg/genshi/output.py", line 532, in __call__
    for ev in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r7556-py2.5.egg/trac/web/chrome.py", line 771, in _strip_accesskeys
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Trac-0.12dev_r7556-py2.5.egg/trac/web/chrome.py", line 760, in _generate
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 569, in _include
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 298, in _match
    ctxt, start=idx + 1, **vars):
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 298, in _match
    ctxt, start=idx + 1, **vars):
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 245, in _match
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 543, in _exec
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 533, in _eval
    for event in substream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 496, in _eval
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 551, in _flatten
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/path.py", line 141, in _generate
    subevent = stream.next()
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 569, in _include
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 234, in _strip
    event = stream.next()
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 543, in _exec
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 533, in _eval
    for event in substream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 496, in _eval
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 551, in _flatten
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/path.py", line 141, in _generate
    subevent = stream.next()
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 569, in _include
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 234, in _strip
    event = stream.next()
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 543, in _exec
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 496, in _eval
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 551, in _flatten
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/filters/i18n.py", line 213, in __call__
    new_substream = list(self(substream, ctxt, msgbuf=msgbuf))
  File "build/bdist.linux-i686/egg/genshi/filters/i18n.py", line 213, in __call__
    new_substream = list(self(substream, ctxt, msgbuf=msgbuf))
  File "build/bdist.linux-i686/egg/genshi/filters/i18n.py", line 213, in __call__
    new_substream = list(self(substream, ctxt, msgbuf=msgbuf))
  File "build/bdist.linux-i686/egg/genshi/filters/i18n.py", line 213, in __call__
    new_substream = list(self(substream, ctxt, msgbuf=msgbuf))
  File "build/bdist.linux-i686/egg/genshi/filters/i18n.py", line 213, in __call__
    new_substream = list(self(substream, ctxt, msgbuf=msgbuf))
  File "build/bdist.linux-i686/egg/genshi/filters/i18n.py", line 170, in __call__
    search_text=False, msgbuf=msgbuf)
  File "build/bdist.linux-i686/egg/genshi/filters/i18n.py", line 201, in __call__
    msgbuf.append(kind, data, pos)
  File "build/bdist.linux-i686/egg/genshi/filters/i18n.py", line 379, in append
    param = self.params.pop(0)
IndexError: pop from empty list

Attachments

Change History

  Changed 3 months ago by rblank

The traceback doesn't help much... Could you please give us some more information about the context of the error? What operations did lead to the error? Is it reproducible? Anything special about the data that should have been displayed?

  Changed 3 months ago by Daniel Nauck <dna@…>

Hello,

this happens on every error page and also when i click on the wiki "Edit" button.

  Changed 3 months ago by rblank

I cannot reproduce this here using [7575]. You might want to try the following:

  • Update to the latest trunk.
  • Disable all plugins, then add one after the other until it breaks.

Is your Trac instance publicly accessible?

  Changed 3 months ago by Daniel Nauck <dna@…>

follow-up: ↓ 7   Changed 3 months ago by cboos

  • keywords genshi added

See #7525. It seems that Genshi 0.5.1 is not recent enough for trunk (with or without Babel, I don't know) but according to #7525 a more recent version should work.

This needs to be documented somewhere or put in the setup.py requirements.

  Changed 3 months ago by Daniel Nauck <dna@…>

It works with Genshi 0.6dev-r960

in reply to: ↑ 5   Changed 3 months ago by rblank

Replying to cboos:

It seems that Genshi 0.5.1 is not recent enough for trunk (with or without Babel, I don't know) but according to #7525 a more recent version should work.

For reference, I am running trunk with 0.5.1 and it seems to work ok. Babel is not installed, though. And I have only tested tracd, not mod_python.

  Changed 2 months ago by info@…

Getting the same problem here with Trac r7621 and Babel 0.9.4. Will switch to 0.6-dev as suggested to see if this fixes it.

  Changed 2 months ago by info@…

  • cc info@… added

Err, that should be Genshi 0.5.1 in the previous comment.

  Changed 6 weeks ago by cboos

  • keywords genshi051 added; genshi removed
  • status changed from new to closed
  • resolution set to fixed

With [7727] I now also get this on the Timeline with Babel 0.9.4 and Genshi 0.5.1.

This is related to the introduction of a i18n:msg tag in the timeline.html template. The wiki_edit.html also has one, as well as the error.html.

So this effectively means that 0.12dev with Babel has stopped to be compatible with Genshi 0.5.1. Updated the requirement in setup.py, in r7728.

One could eventually fix 0.5.1 and maybe it even works with 0.5-stable, but better spend that time on getting Genshi's advanced-18n/0.6 done.

Add/Change #7684 (Render error on error pages and wiki edits)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from (none). Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.