Hello Simon,
Il 22/08/2011 13:48, Simon Zimmermann ha scritto:
I'm running Django project using nginx and uwsgi-0.9.6.8, and it works fine!
If I upgrade
to a newer version of uwsgi, however, I'm receiving a 502 over HTTP and in
my
logs I see a one line Python exception:
TypeError: 'str' object is not callable
I have no idea where this exception occurs. So my question is simply how I
can
debug this to find the cause of the error. Since the exception only occurs
when
I run my Django project under a newer version of uwsgi I can't debug this
using
the django runserver. Should I compile wsgi with debug flags and run the
server
with gdb?
I suspect the error to have something to do with my wsgi.py file so I'll
post my
configuration along with this email just in case I'm doing something
obviously
wrong.
Posting the configuration is always the right thing to do :)
# django_wsgi.py
import os
import sys
import site
import django.core.handlers.wsgi
from django.conf import settings
os.environ['DJANGO_SETTINGS_MODULE'] = '<project>.settings'
PROJECT_PATH = getattr(settings, 'PROJECT_PATH')
sys.path.append(PROJECT_PATH)
site.addsitedir(os.path.join(PROJECT_PATH,
'/ve/lib/python2.6/site-packages'))
application = django.core.handlers.wsgi.WSGIHandler()
applications = {'':'application', }
^^^^^^^^^^^^
Shouldn't this be a callable and not a string?
thanks,
riccardo
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi