Modify ↓
#10989 closed defect (fixed)
UnicodeEncodeError with Genshi 0.7
Reported by: | Owned by: | falkb | |
---|---|---|---|
Priority: | high | Component: | SimpleMultiProjectPlugin |
Severity: | critical | Keywords: | genshi 0.7 |
Cc: | Trac Release: | 1.0 |
Description
Error callstack
Trac detected an internal error: UnicodeEncodeError: 'ascii' codec can't encode characters in position 227-230: ordinal not in range(128)
Most recent call last: File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/web/main.py", line 497, in _dispatch_request dispatcher.dispatch(req) File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/web/main.py", line 233, in dispatch content_type) File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/web/chrome.py", line 983, in render_template stream |= self._filter_stream(req, method, filename, stream, data) File "/usr/local/lib/python2.7/dist-packages/Genshi-0.7-py2.7-linux-i686.egg/genshi/core.py", line 133, in __or__ return Stream(_ensure(function(self)), serializer=self.serializer) File "/usr/local/lib/python2.7/dist-packages/Trac-1.0.1-py2.7.egg/trac/web/chrome.py", line 1162, in inner data) File "/usr/local/lib/python2.7/dist-packages/SimpleMultiProject-0.0.3dev-py2.7.egg/simplemultiproject/roadmap.py", line 195, in filter_stream div_milestones_array = self.__extract_div_milestones_array('<div class="milestone">',stream_milestones) File "/usr/local/lib/python2.7/dist-packages/SimpleMultiProject-0.0.3dev-py2.7.egg/simplemultiproject/roadmap.py", line 108, in __extract_div_milestones_array html_milestones = str(stream_milestones)
I believe this error is caused by this changeset http://genshi.edgewall.org/changeset/1140
I try to call stream_milestones.render() instead of str(stream_milestones)
html_milestones = str(stream_milestones) html_milestones = stream_milestones.render()
And this fix this probelm
System Information
Package Version Trac 1.0.1 Babel 0.9.6 Docutils 0.7 Genshi 0.7 (without speedups) mod_wsgi 3.3 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL}) Pygments 1.4 pysqlite 2.6.0 Python 2.7.2+ (default, Oct 4 2011, 20:29:37) [GCC 4.6.1] pytz 2010b setuptools 0.6 SQLite 3.7.7 Subversion 1.6.12 (r955767) jQuery 1.7.2
Attachments (0)
Change History (6)
comment:1 Changed 12 years ago by
Owner: | changed from Christopher Paredes to falkb |
---|
comment:2 Changed 11 years ago by
Status: | new → assigned |
---|
Note: See
TracTickets for help on using
tickets.
Thanks. Applying this patch it still works for me, too. My question is to you: Is render() available for older versions or could it break something?