500 internal server error - unsupported locale setting, trac version 0.12

215 views
Skip to first unread message

DimeDroll

unread,
Aug 30, 2010, 12:03:44 AM8/30/10
to Trac Users
Hello,
I'm getting this error:
[error] mod_wsgi (pid=18164): Exception occurred processing WSGI
script '/services/trac-svn/cgi-bin/trac.wsgi'.
[error] Traceback (most recent call last):
[error] File "path/to/cgi-bin/trac.wsgi", line 36, in application
[error] return dispatch_request(environ, start_request)
[error] File "build/bdist.linux-i686/egg/trac/web/main.py", line
396, in dispatch_request
[error] locale.setlocale(locale.LC_ALL, environ['trac.locale'
[error] File "/usr/local/lib/python2.5/locale.py", line 478, in
setlocale
[error] return _setlocale(category, locale)
[error] Error: unsupported locale setting

After upgrading my trac from version 0.11 to 0.12.
I have already tried to set proper character set in my httpd.conf
without success.
I searched in google for the resolution, but there was no helpful
solution.
Can please someone tell me where else i should look?
I can add more details if you want.
Thank you.

Regards,
Dmitriy

Christian Boos

unread,
Sep 2, 2010, 3:22:54 AM9/2/10
to trac-...@googlegroups.com

First, you should dump the value of environ['trac.locale'] to check if
it matches what you expect.
i.e. install Trac from source as explained here
(http://trac.edgewall.org/wiki/TracDownload#Tracstable) and modify the
trac/web/main.py before line 396 to add:

print>>sys.stderr, "environ['trac.locale'] == ", environ['trac.locale']

(as you don't have a log handler available there; the debug output
should appear in the same apache log file as you've shown us above).

If it's the value you have configured in httpd.conf, then pick /another/
value, one supported by your version of Python (check on the command
line). If not, then something is wrong with your configuration.

-- Christian

Reply all
Reply to author
Forward
0 new messages