【发布时间】:2015-07-05 18:17:11
【问题描述】:
我有一个 git 存储库,用于我的 django 项目。当我在本地更改某些内容时,我将其推送并拉到我的“真实”服务器上。我的 settings.py 文件被忽略,所以没有冲突。然而,在最新的拉动之后,我收到以下错误:
[Sun Jul 05 16:59:05 2015] [error] No handlers could be found for logger "django.request"
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] mod_wsgi (pid=30560): Exception occurred processing WSGI script '/home/libraring/webapps/libraring/src/mysite/wsgi.py'.
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] Traceback (most recent call last):
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/core/handlers/wsgi.py", line 187, in __call__
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] response = self.get_response(request)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/core/handlers/base.py", line 199, in get_response
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/core/handlers/base.py", line 236, in handle_uncaught_exception
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] return debug.technical_500_response(request, *exc_info)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/views/debug.py", line 91, in technical_500_response
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] html = reporter.get_traceback_html()
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/views/debug.py", line 350, in get_traceback_html
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] return t.render(c)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/template/base.py", line 148, in render
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] return self._render(context)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/template/base.py", line 142, in _render
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] return self.nodelist.render(context)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/template/base.py", line 844, in render
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] bit = self.render_node(node, context)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/template/debug.py", line 80, in render_node
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] return node.render(context)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/template/debug.py", line 90, in render
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] output = self.filter_expression.resolve(context)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/template/base.py", line 624, in resolve
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] new_obj = func(obj, *arg_vals)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/template/defaultfilters.py", line 769, in date
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] return format(value, arg)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/utils/dateformat.py", line 343, in format
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] return df.format(format_string)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/utils/dateformat.py", line 35, in format
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] pieces.append(force_text(getattr(self, piece)()))
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/utils/dateformat.py", line 268, in r
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] return self.format('D, j M Y H:i:s O')
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/utils/dateformat.py", line 35, in format
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] pieces.append(force_text(getattr(self, piece)()))
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/utils/encoding.py", line 85, in force_text
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] s = six.text_type(s)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/utils/functional.py", line 144, in __text_cast
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] return func(*self.__args, **self.__kw)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/utils/translation/__init__.py", line 83, in ugettext
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] return _trans.ugettext(message)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/utils/translation/trans_real.py", line 325, in ugettext
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] return do_translate(message, 'ugettext')
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/utils/translation/trans_real.py", line 306, in do_translate
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] _default = translation(settings.LANGUAGE_CODE)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/utils/translation/trans_real.py", line 209, in translation
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] default_translation = _fetch(settings.LANGUAGE_CODE)
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] File "/home/libraring/webapps/libraring/lib/python2.7/django/utils/translation/trans_real.py", line 189, in _fetch
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] "The translation infrastructure cannot be initialized before the "
[Sun Jul 05 16:59:05 2015] [error] [client 127.0.0.1] AppRegistryNotReady: The translation infrastructure cannot be initialized before the apps registry is ready. Check that you don't make non-lazy gettext calls at import time.
此外,当我打开我的网址时,我收到“内部 200 错误”。
有趣的是,当我在服务器上运行 django 应用程序时,它会在本地运行,即。 'python manage.py runserver' 我没有收到任何错误。
【问题讨论】:
-
没有“200 错误”之类的东西。 200 是成功代码。也许您收到 500 错误?
标签: django