Hi all, I also asked this on the mod_wsgi list but it seems like it
may be being caused by Django so I figured this might help. Sorry if
it turns out to not be Django-related, but the exception is getting
raised by Django code.

So I'm running into some strange errors with Django + mod_wsgi. Here's
a stack
trace - this happens every few hours or so for a site with around 1
request per second load:

[Sun Jan 10 10:14:02 2010] [error] [client 127.0.0.1] mod_wsgi
(pid=29947): Exception occurred within WSGI script '/home/prod/repo/
web/apache/django.wsgi'.
[Sun Jan 10 10:14:02 2010] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Sun Jan 10 10:14:02 2010] [error] [client 127.0.0.1]   File "/var/
lib/
python-support/python2.5/django/core/handlers/wsgi.py", line 231, in
__call__
[Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1]
set_script_prefix(base.get_script_name(environ))
[Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1]   File "/var/
lib/
python-support/python2.5/django/core/handlers/base.py", line 199, in
get_script_name
[Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1]     return
force_unicode(environ.get('SCRIPT_NAME', u''))
[Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1]   File "/var/
lib/
python-support/python2.5/django/utils/encoding.py", line 68, in
force_unicode
[Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1]     s =
s.decode
(encoding, errors)
[Sun Jan 10 10:14:03 2010] [error] [client 127.0.0.1] LookupError: no
codec search functions registered: can't find encoding

I added print statements and the encoding is simply "utf-8" here, and
s is the empty string. When I run "".decode("utf-8") from the python
interpreter, it works fine. How could this be happening?

I'm running mod_wsgi in daemon mode with the parameters
    WSGIDaemonProcess prod processes=3 maximum-requests=500
threads=10
    WSGIProcessGroup prod
    WSGIScriptAlias / /home/prod/repo/web/apache/django.wsgi
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to