#9450 closed defect (cantfix)
LookupError: unknown encoding: utf_8_valencia
Reported by: | Jordi Mallach | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | i18n | Version: | 0.12 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
How to reproduce
While performing the GET operation on `/wiki/TracGuide, Trac has issued an internal error:
The important bit of this setup is that tracd is running under the ca_ES@… lcoale (ie, a locale with a modifier).
Other python problems using locales with modifier (de_DE@euro, sr@Latn, etc.) suggest me that this will be a problem with any modifier.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511448, which might be tangentially related.
Paràmetres de la petició:
{'page': u'TracGuide'}
User agent: Mozilla/5.0 (X11; U; Linux x86_64; ca; rv:1.9.2.4) Gecko/20100505 Iceweasel/3.6.4 (like Firefox/3.6.4)
Informació del sistema
This is an unconfigured Trac 0.12 instance, just installed with python-pip. Absolutely no changes done to the install (no users, no authentication setup, nothing).
Connectors habilitats
No plugins installed.
Traça del Python
Traceback (most recent call last): File "/opt/trac/lib/python2.5/site-packages/trac/web/main.py", line 513, in _dispatch_request dispatcher.dispatch(req) File "/opt/trac/lib/python2.5/site-packages/trac/web/main.py", line 256, in dispatch content_type) File "/opt/trac/lib/python2.5/site-packages/trac/web/chrome.py", line 844, in render_template stream.render(method, doctype=doctype, out=buffer) File "/opt/trac/lib/python2.5/site-packages/genshi/core.py", line 183, in render return encode(generator, method=method, encoding=encoding, out=out) File "/opt/trac/lib/python2.5/site-packages/genshi/output.py", line 58, in encode for chunk in iterator: File "/opt/trac/lib/python2.5/site-packages/genshi/output.py", line 339, in __call__ for kind, data, pos in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/output.py", line 826, in __call__ for kind, data, pos in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/output.py", line 670, in __call__ for kind, data, pos in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/output.py", line 771, in __call__ for kind, data, pos in chain(stream, [(None, None, None)]): File "/opt/trac/lib/python2.5/site-packages/genshi/output.py", line 586, in __call__ for ev in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/core.py", line 288, in _ensure for event in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/core.py", line 288, in _ensure for event in stream: File "/opt/trac/lib/python2.5/site-packages/trac/web/chrome.py", line 945, in _strip_accesskeys for kind, data, pos in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/core.py", line 288, in _ensure for event in stream: File "/opt/trac/lib/python2.5/site-packages/trac/web/chrome.py", line 934, in _generate for kind, data, pos in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/template/base.py", line 605, in _include for event in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/template/markup.py", line 378, in _match ctxt, start=idx + 1, **vars): File "/opt/trac/lib/python2.5/site-packages/genshi/template/markup.py", line 378, in _match ctxt, start=idx + 1, **vars): File "/opt/trac/lib/python2.5/site-packages/genshi/template/markup.py", line 327, in _match for event in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/template/base.py", line 545, in _flatten for kind, data, pos in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/core.py", line 288, in _ensure for event in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/path.py", line 588, in _generate subevent = next() File "/opt/trac/lib/python2.5/site-packages/genshi/template/base.py", line 605, in _include for event in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/template/markup.py", line 316, in _strip event = next() File "/opt/trac/lib/python2.5/site-packages/genshi/template/base.py", line 545, in _flatten for kind, data, pos in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/core.py", line 288, in _ensure for event in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/path.py", line 588, in _generate subevent = next() File "/opt/trac/lib/python2.5/site-packages/genshi/template/base.py", line 605, in _include for event in stream: File "/opt/trac/lib/python2.5/site-packages/genshi/template/markup.py", line 316, in _strip event = next() File "/opt/trac/lib/python2.5/site-packages/genshi/template/base.py", line 565, in _flatten result = _eval_expr(data, ctxt, vars) File "/opt/trac/lib/python2.5/site-packages/genshi/template/base.py", line 277, in _eval_expr retval = expr.evaluate(ctxt) File "/opt/trac/lib/python2.5/site-packages/genshi/template/eval.py", line 178, in evaluate return eval(self.code, _globals, {'__data__': data}) File "/opt/trac/lib/python2.5/site-packages/trac/wiki/templates/wiki_view.html", line 56, in <Expression u'dateinfo(page.time)'> title="$last_modification">Last modified</a> ${dateinfo(page.time)} ago File "/opt/trac/lib/python2.5/site-packages/trac/timeline/web_ui.py", line 264, in dateinfo precision='second') File "/opt/trac/lib/python2.5/site-packages/trac/timeline/web_ui.py", line 297, in get_timeline_link iso_date = display_date = format_datetime(date, 'iso8601', req.tz) File "/opt/trac/lib/python2.5/site-packages/trac/util/datefmt.py", line 154, in format_datetime return unicode(text, encoding, 'replace') LookupError: unknown encoding: utf_8_valencia
Attachments (0)
Change History (2)
comment:1 by , 15 years ago
Resolution: | → cantfix |
---|---|
Status: | new → closed |
comment:2 by , 15 years ago
I guess you're right, and this is a python issue which guesses an encoding taking the @modifier part of the locale. I'll go poke in Python to see what can be done.
So what? You're using an encoding which is unknown to Python, I don't see how this can be an issue with Trac itself. If this really annoys you (and you're sure utf_8_valencia is valid), then you should report it upstream (perhaps discuss this on the Python mailing list before filing a bug).