我有一个 django 服务器正在运行,并且不知从何而来,我得到了这个错误。我真的不知道是什么变化导致了这种情况。
我试图解决这个问题几个小时,但我找不到为什么会这样。
请给我一些想法。
问我是否需要我的代码的特定部分。虽然 Python 路径没有提到我的任何文件..
完整追溯:
Environment:
Request Method: GET
Request URL: http://whimbee-django.alwaysdata.net/api/v2/eventchat/?format=json
Django Version: 1.4.1
Python Version: 2.6.6
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'tastypie',
'core',
'iospush')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'core.middleware.XsSharing')
Traceback:
File "/usr/local/alwaysdata/python/django/1.4.1/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/alwaysdata/python/django/1.4.1/django/views/decorators/csrf.py" in wrapped_view
77. return view_func(*args, **kwargs)
File "/home/whimbee-django/modules/django_tastypie-0.9.15-py2.6.egg/tastypie/resources.py" in wrapper
264. return self._handle_500(request, e)
File "/home/whimbee-django/modules/django_tastypie-0.9.15-py2.6.egg/tastypie/resources.py" in _handle_500
286. return self.error_response(request, data, response_class=response_class)
File "/home/whimbee-django/modules/django_tastypie-0.9.15-py2.6.egg/tastypie/resources.py" in error_response
1243. serialized = self.serialize(request, errors, desired_format)
File "/home/whimbee-django/modules/django_tastypie-0.9.15-py2.6.egg/tastypie/resources.py" in serialize
397. return self._meta.serializer.serialize(data, format, options)
File "/home/whimbee-django/modules/django_tastypie-0.9.15-py2.6.egg/tastypie/serializers.py" in serialize
187. serialized = getattr(self, "to_%s" % desired_format)(bundle, options)
File "/home/whimbee-django/modules/django_tastypie-0.9.15-py2.6.egg/tastypie/serializers.py" in to_json
356. return simplejson.dumps(data, cls=json.DjangoJSONEncoder, sort_keys=True, ensure_ascii=False)
File "/usr/languages/python/2.6/lib/python2.6/json/__init__.py" in dumps
237. **kw).encode(obj)
Exception Type: TypeError at /api/v2/eventchat/
Exception Value: __init__() got an unexpected keyword argument 'default'