Opened 15 years ago
Closed 15 years ago
#9171 closed defect (fixed)
IndexError: list index out of range
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | i18n | Version: | 0.12dev |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Browsing random tickets on t.e.o. I get the following InternalError, which I suspect related to the i18n layer: on a particular ticket (#6353 to mention one), it always happens when using the italian locale, while fetching it with wget (and thus, in the native english language) it works without problems.
Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 514, in _dispatch_request dispatcher.dispatch(req) File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 257, in dispatch content_type) File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 862, in render_template stream.render(method, doctype=doctype, out=buffer) File "build/bdist.linux-x86_64/egg/genshi/core.py", line 183, in render return encode(generator, method=method, encoding=encoding, out=out) File "build/bdist.linux-x86_64/egg/genshi/output.py", line 58, in encode for chunk in iterator: File "build/bdist.linux-x86_64/egg/genshi/output.py", line 339, in __call__ for kind, data, pos in stream: File "build/bdist.linux-x86_64/egg/genshi/output.py", line 826, in __call__ for kind, data, pos in stream: File "build/bdist.linux-x86_64/egg/genshi/output.py", line 670, in __call__ for kind, data, pos in stream: File "build/bdist.linux-x86_64/egg/genshi/output.py", line 771, in __call__ for kind, data, pos in chain(stream, [(None, None, None)]): File "build/bdist.linux-x86_64/egg/genshi/output.py", line 586, in __call__ for ev in stream: File "build/bdist.linux-x86_64/egg/genshi/core.py", line 288, in _ensure for event in stream: File "build/bdist.linux-x86_64/egg/genshi/core.py", line 288, in _ensure for event in stream: File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 966, in _strip_accesskeys for kind, data, pos in stream: File "build/bdist.linux-x86_64/egg/genshi/core.py", line 288, in _ensure for event in stream: File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 955, in _generate for kind, data, pos in stream: File "build/bdist.linux-x86_64/egg/genshi/core.py", line 288, in _ensure for event in stream: File "build/bdist.linux-x86_64/egg/genshi/template/base.py", line 592, in _include for event in stream: File "build/bdist.linux-x86_64/egg/genshi/template/markup.py", line 381, in _match ctxt, start=idx + 1, **vars): File "build/bdist.linux-x86_64/egg/genshi/template/markup.py", line 381, in _match ctxt, start=idx + 1, **vars): File "build/bdist.linux-x86_64/egg/genshi/template/markup.py", line 381, in _match ctxt, start=idx + 1, **vars): File "build/bdist.linux-x86_64/egg/genshi/template/markup.py", line 330, in _match for event in stream: File "build/bdist.linux-x86_64/egg/genshi/template/base.py", line 532, in _flatten for kind, data, pos in stream: File "build/bdist.linux-x86_64/egg/genshi/core.py", line 288, in _ensure for event in stream: File "build/bdist.linux-x86_64/egg/genshi/path.py", line 588, in _generate subevent = next() File "build/bdist.linux-x86_64/egg/genshi/template/base.py", line 592, in _include for event in stream: File "build/bdist.linux-x86_64/egg/genshi/template/markup.py", line 330, in _match for event in stream: File "build/bdist.linux-x86_64/egg/genshi/template/markup.py", line 319, in _strip event = next() File "build/bdist.linux-x86_64/egg/genshi/template/base.py", line 532, in _flatten for kind, data, pos in stream: File "build/bdist.linux-x86_64/egg/genshi/core.py", line 288, in _ensure for event in stream: File "build/bdist.linux-x86_64/egg/genshi/path.py", line 588, in _generate subevent = next() File "build/bdist.linux-x86_64/egg/genshi/template/base.py", line 592, in _include for event in stream: File "build/bdist.linux-x86_64/egg/genshi/template/markup.py", line 319, in _strip event = next() File "build/bdist.linux-x86_64/egg/genshi/template/base.py", line 532, in _flatten for kind, data, pos in stream: File "build/bdist.linux-x86_64/egg/genshi/core.py", line 288, in _ensure for event in stream: File "build/bdist.linux-x86_64/egg/genshi/path.py", line 588, in _generate subevent = next() File "build/bdist.linux-x86_64/egg/genshi/template/base.py", line 592, in _include for event in stream: File "build/bdist.linux-x86_64/egg/genshi/template/markup.py", line 319, in _strip event = next() File "build/bdist.linux-x86_64/egg/genshi/template/base.py", line 532, in _flatten for kind, data, pos in stream: File "build/bdist.linux-x86_64/egg/genshi/filters/i18n.py", line 172, in _generate for event in msgbuf.translate(gettext(msgbuf.format())): File "build/bdist.linux-x86_64/egg/genshi/filters/i18n.py", line 1025, in translate parts = parse_msg(string) File "build/bdist.linux-x86_64/egg/genshi/filters/i18n.py", line 1138, in parse_msg parts.append((stack[-1], string)) IndexError: list index out of range
System info
Trac | 0.12dev-r9391
|
Babel | 0.9.4
|
Docutils | 0.6
|
Genshi | 0.6dev-r1096
|
psycopg2 | 2.0.8
|
Pygments | 1.2.2dev-20100224
|
Python | 2.5.2 (r252:60911, Oct 5 2008, 19:29:17) [GCC 4.3.2]
|
setuptools | 0.6c9
|
Subversion | 1.5.1 (r32289)
|
Attachments (0)
Change History (4)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Thank you a lot, please consider applying my latest patch on #5489, this bug forced me to switch to another language in the browser to be able to upload it, so I guess it should be pushed on t.e.o. ASAP.
follow-up: 4 comment:3 by , 15 years ago
Milestone: | → 0.12 |
---|---|
Owner: | set to |
Patch committed in [9404] and server updated.
Now I leave the ticket open as a reminder to create a Genshi ticket for asking to improve the robustness of the i18n filter.
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Genshi ticket for asking to improve the robustness of the i18n filter.
See #G378.
Some more details:
and:
Original message seems coming from:
i.e.
Can you spot the difference? [:]-)