Edgewall Software

Opened 13 years ago

Last modified 10 years ago

#10126 closed defect

TracError: Genshi UnicodeEncodeError error while rendering template (fresh Trac install) — at Initial Version

Reported by: dereks@… Owned by:
Priority: normal Milestone: 0.12.3
Component: general Version:
Severity: critical Keywords: genshi unicode
Cc: Thijs Triemstra Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I have installed Trac like I have several times before, using 0.11 and 0.12, under Ubuntu 8.04 and Ubuntu 10.04. Today I installed 0.12.2 fresh, using this command:

sudo easy_install Trac

But when I visit my Trac site, I get this error in my web page:

Traceback (most recent call last):

File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/web/api.py", line 440, in send_error

data, 'text/html')

File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/web/chrome.py", line 885, in render_template

location=location))

TracError: Genshi UnicodeEncodeError error while rendering template '/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/templates/layout.html', line 12, char -1

I have several plugins installed, but the exception seems to be coming from the core Trac code, not one of the plugins. (Again, this all worked before.)

How do I troubleshoot this issue? There is no additional information in the Apache logs (I'm using mod_python).

A possibly related problem: When I visit my "/projects" URL, I get an internal server error and this Unicode error is in my Apache error.log:

[Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] mod_python (pid=4934, interpreter='main_interpreter', phase='PythonHandler', handler='trac.web.modpython_frontend'): Application error [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] ServerName: 'derek.example.com' [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] DocumentRoot: '/var/www' [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] URI: '/projects/' [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] Location: '/projects' [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] Directory: None [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] Filename: '/var/www/projects' [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] PathInfo: '/' [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] Traceback (most recent call last): [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n default=default_handler, arg=req, silent=hlist.silent) [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1229, in _process_target\n result = _execute_target(config, req, object, arg) [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] File "/usr/lib/python2.6/dist-packages/mod_python/importer.py", line 1128, in _execute_target\n result = object(arg) [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/web/modpython_frontend.py", line 149, in handler\n gateway.run(dispatch_request) [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/web/wsgi.py", line 89, in run\n response = application(self.environ, self._start_response) [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/web/main.py", line 411, in dispatch_request\n env_paths) [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/web/main.py", line 703, in send_project_index\n req.send(output, 'text/html') [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/web/api.py", line 416, in send\n self.write(content) [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.2-py2.6.egg/trac/web/api.py", line 534, in write\n raise ValueError("Can't send unicode content") [Sun Apr 10 23:58:58 2011] [error] [client 192.168.2.10] ValueError: Can't send unicode content

Change History (0)

Note: See TracTickets for help on using tickets.