Hello experts,
I have been struggling with setting Trac with Apache. I am using the
mod_wsgi method. I believe that I have been following the instructions
very closely.
Unfortunately, I am getting this error when trying to access Trac via
Apache, e.g.,
http://localhost/trac/
Trac detected an internal error:
LookupError: unknown encoding: A
Here is the traceback:
Most recent call last:
File "C:/Python27/lib/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 "C:/Python27/lib/site-packages/trac/timeline/web_ui.py", line
257, in dateinfo
precision='second')
File "C:/Python27/lib/site-packages/trac/timeline/web_ui.py", line
290, in get_timeline_link
iso_date = display_date = format_datetime(date, 'iso8601',
req.tz)
File "C:/Python27/lib/site-packages/trac/util/datefmt.py", line 154,
in format_datetime
return unicode(text, encoding, 'replace')
My system info:
User Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64;
Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; Media Center PC 6.0; BRI/1; .NET4.0C; BRI/2; Creative
AutoUpdate v1.40.04)
Trac
0.12.2
Genshi
0.6
mod_wsgi
3.3 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
pysqlite
2.6.0
Python
2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)]
setuptools
0.6c11
SQLite
3.6.21
Subversion
1.6.15 (r1038135)
jQuery
1.4.2
Enabled Plugins:
tracaccountmanager
0.3dev-r9929
c:\python27\lib\site-packages\tracaccountmanager-0.3dev_r9929-
py2.7.egg
I believe this is a problem with the Python locale but I am not sure
how to get this right. I checked my Python locale and it shows:
>>> import locale, sys
>>> print locale.getpreferredencoding(), sys.getdefaultencoding()
cp1252 ascii
>>>
So, this looks fine to me. I am not sure why Trac would think that it
is an "unknown" locale.
Could someone please offer help?
Thanks,
Haksun
Numerical Method Inc.