Django升级1.9.6出现的bug

Error日志:

Error opening file for reading: Permission denied
ERROR Internal Server Error: /
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 174, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 172, in get_response
    response = response.render()
  File "/usr/local/lib/python2.7/dist-packages/django/template/response.py", line 160, in render
    self.content = self.rendered_content
  File "/usr/local/lib/python2.7/dist-packages/django/template/response.py", line 137, in rendered_content
    content = template.render(context, self._request)
  File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 95, in render
    return self.template.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 206, in render
    return self._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 197, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 173, in render
    return compiled_parent._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 197, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 69, in render
    result = block.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/library.py", line 243, in render
    return t.render(new_context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 208, in render
    return self._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 197, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py", line 220, in render
    nodelist.append(node.render_annotated(context))
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 1043, in render
    output = self.filter_expression.resolve(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 736, in resolve
    new_obj = func(obj, *arg_vals)
  File "/usr/local/lib/python2.7/dist-packages/django/template/defaultfilters.py", line 51, in _dec
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/template/defaultfilters.py", line 278, in truncatechars
    return Truncator(value).chars(length)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 194, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/text.py", line 103, in chars
    for char in self.add_truncation_text('', truncate):
  File "/usr/local/lib/python2.7/dist-packages/django/utils/text.py", line 77, in add_truncation_text
    '%(truncated_text)s...')
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/__init__.py", line 93, in pgettext
    return _trans.pgettext(context, message)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 326, in pgettext
    result = ugettext(msg_with_ctxt)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 321, in ugettext
    return do_translate(message, 'ugettext')
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 298, in do_translate
    _default = _default or translation(settings.LANGUAGE_CODE)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 205, in translation
    _translations[language] = DjangoTranslation(language)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 118, in __init__
    raise IOError("No translation files found for default language %s." % settings.LANGUAGE_CODE)
IOError: No translation files found for default language zh-CN.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 177, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 230, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 284, in handle_uncaught_exception
    'request': request
  File "/usr/lib/python2.7/logging/__init__.py", line 1166, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1258, in _log
    self.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1268, in handle
    self.callHandlers(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1308, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 748, in handle
    self.emit(record)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/log.py", line 115, in emit
    message = "%s\n\n%s" % (self.format(no_exc_record), reporter.get_traceback_text())
  File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line 323, in get_traceback_text
    return t.render(c)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 206, in render
    return self._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 197, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 1043, in render
    output = self.filter_expression.resolve(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 736, in resolve
    new_obj = func(obj, *arg_vals)
  File "/usr/local/lib/python2.7/dist-packages/django/template/defaultfilters.py", line 778, in date
    return formats.date_format(value, arg)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/formats.py", line 151, in date_format
    return dateformat.format(value, get_format(format or 'DATE_FORMAT', use_l10n=use_l10n))
  File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 367, in format
    return df.format(format_string)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 37, in format
    pieces.append(force_text(getattr(self, piece)()))
  File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 292, in r
    return self.format('D, j M Y H:i:s O')
  File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 37, in format
    pieces.append(force_text(getattr(self, piece)()))
  File "/usr/local/lib/python2.7/dist-packages/django/utils/encoding.py", line 78, in force_text
    s = six.text_type(s)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 114, in __text_cast
    return func(*self.__args, **self.__kw)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/__init__.py", line 85, in ugettext
    return _trans.ugettext(message)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 321, in ugettext
    return do_translate(message, 'ugettext')
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 298, in do_translate
    _default = _default or translation(settings.LANGUAGE_CODE)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 205, in translation
    _translations[language] = DjangoTranslation(language)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 118, in __init__
    raise IOError("No translation files found for default language %s." % settings.LANGUAGE_CODE)
IOError: No translation files found for default language zh-CN.
[pid: 3318|app: 0|req: 1/1] 219.237.242.144 () {44 vars in 5238 bytes} [Fri May  6 10:19:53 2016] GET / => generated 0 bytes in 243 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)
Error opening file for reading: Permission denied
[pid: 3321|app: 0|req: 1/2] 68.180.229.29 () {32 vars in 469 bytes} [Fri May  6 10:21:04 2016] GET /ge/qqt-a653480/ => generated 19272 bytes in 272 msecs (HTTP/1.1 200) 3 headers in 195 bytes (1 switches on core 0)
Error opening file for reading: Permission denied
ERROR Internal Server Error: /
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 174, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 172, in get_response
    response = response.render()
  File "/usr/local/lib/python2.7/dist-packages/django/template/response.py", line 160, in render
    self.content = self.rendered_content
  File "/usr/local/lib/python2.7/dist-packages/django/template/response.py", line 137, in rendered_content
    content = template.render(context, self._request)
  File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py", line 95, in render
    return self.template.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 206, in render
    return self._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 197, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 173, in render
    return compiled_parent._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 197, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", line 69, in render
    result = block.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/library.py", line 243, in render
    return t.render(new_context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 208, in render
    return self._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 197, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py", line 220, in render
    nodelist.append(node.render_annotated(context))
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 1043, in render
    output = self.filter_expression.resolve(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 736, in resolve
    new_obj = func(obj, *arg_vals)
  File "/usr/local/lib/python2.7/dist-packages/django/template/defaultfilters.py", line 51, in _dec
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/template/defaultfilters.py", line 278, in truncatechars
    return Truncator(value).chars(length)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 194, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/text.py", line 103, in chars
    for char in self.add_truncation_text('', truncate):
  File "/usr/local/lib/python2.7/dist-packages/django/utils/text.py", line 77, in add_truncation_text
    '%(truncated_text)s...')
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/__init__.py", line 93, in pgettext
    return _trans.pgettext(context, message)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 326, in pgettext
    result = ugettext(msg_with_ctxt)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 321, in ugettext
    return do_translate(message, 'ugettext')
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 298, in do_translate
    _default = _default or translation(settings.LANGUAGE_CODE)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 205, in translation
    _translations[language] = DjangoTranslation(language)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 118, in __init__
    raise IOError("No translation files found for default language %s." % settings.LANGUAGE_CODE)
IOError: No translation files found for default language zh-CN.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 177, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 230, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 284, in handle_uncaught_exception
    'request': request
  File "/usr/lib/python2.7/logging/__init__.py", line 1166, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1258, in _log
    self.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1268, in handle
    self.callHandlers(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1308, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 748, in handle
    self.emit(record)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/log.py", line 115, in emit
    message = "%s\n\n%s" % (self.format(no_exc_record), reporter.get_traceback_text())
  File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py", line 323, in get_traceback_text
    return t.render(c)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 206, in render
    return self._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 197, in _render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 992, in render
    bit = node.render_annotated(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 959, in render_annotated
    return self.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 1043, in render
    output = self.filter_expression.resolve(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 736, in resolve
    new_obj = func(obj, *arg_vals)
  File "/usr/local/lib/python2.7/dist-packages/django/template/defaultfilters.py", line 778, in date
    return formats.date_format(value, arg)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/formats.py", line 151, in date_format
    return dateformat.format(value, get_format(format or 'DATE_FORMAT', use_l10n=use_l10n))
  File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 367, in format
    return df.format(format_string)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 37, in format
    pieces.append(force_text(getattr(self, piece)()))
  File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 292, in r
    return self.format('D, j M Y H:i:s O')
  File "/usr/local/lib/python2.7/dist-packages/django/utils/dateformat.py", line 37, in format
    pieces.append(force_text(getattr(self, piece)()))
  File "/usr/local/lib/python2.7/dist-packages/django/utils/encoding.py", line 78, in force_text
    s = six.text_type(s)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 114, in __text_cast
    return func(*self.__args, **self.__kw)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/__init__.py", line 85, in ugettext
    return _trans.ugettext(message)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 321, in ugettext
    return do_translate(message, 'ugettext')
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 298, in do_translate
    _default = _default or translation(settings.LANGUAGE_CODE)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 205, in translation
    _translations[language] = DjangoTranslation(language)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/translation/trans_real.py", line 118, in __init__
    raise IOError("No translation files found for default language %s." % settings.LANGUAGE_CODE)
IOError: No translation files found for default language zh-CN.

解决方案待续

时间: 2024-10-14 10:59:23

Django升级1.9.6出现的bug的相关文章

美团_ccListView选中Item的颜色修改及解决登陆后升级通知再次弹出的bug

实现,在listView Xml中设置 android:listSelector="@color/green" 2. 解决登陆后升级通知再次弹出的bug ①: MineFragment跳转到Login界面使用StartActivityForResult,而不是StartActivity: @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (data != n

django升级2.1python升级3.7时出现的错误:"trying to load '%s': %s" % (entry[1], e) django.template.library.InvalidTemplateLibrary:

django升级2.1python升级3.7时出现如下的错误: "trying to load '%s': %s" % (entry[1], e) django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'crispy_forms.templatetags.crispy_forms_utils':

0040 重构工程(python django升级)

在Python或Django升级后,如果软件要做相应的升级,则需要重构工程. 1 先在CMD下创建工程 2 复制一份虚拟环境目录 Django的虚拟环境,原则上一个工程一个虚拟环境,如果多个工程共享一个虚拟环境,容易报错. 3 PyCharm打开工程,配置虚拟环境 找到File/Settings/Project/Project Interpreter 点击All,查看当前所有的虚拟环境,如果要为工程增加的虚拟环境已经存在,先删除原来的虚拟环境.因为如果有多个相同的虚拟环境,再增加这个虚拟环境,容

精彩分享 ------ 将"女朋友7.0"升级到"老婆1.0"的Bug

亲爱的技术部: 我急需您的帮助.我最近将"女朋友7.0"升级到"妻子1.0",发现这个新程序意外地启动了孩子生产程序,而且占用了大量的空间和珍贵的资源.这在产品的 使用手册中没有提到.         此外"妻子1.0"自动将自己安装到其他的所有的程序中,它随系统同时启动,监控整个系统的状态."男人夜店2.5"和"迪吧5.3"无法再运行,一旦运行该程 序系统即行崩溃.试图运行"通宵麻将6.3&qu

03.django升级打怪学习记

00.模板 在Django框架中,模板是可以帮助开发者快速生成呈现给用户页面的工具. 模板处理: a.加载 b.渲染 模板主要有两个部分 a.HTML静态代码 b.动态插入的代码段(挖坑,填坑) 01.语法 a.模板中的点语法:grades grade 属性或方法:grade.gname 索引:grades.0.gname b.模板中的标签:语法{% tag %} 作用:b1.加载外部传入的变量 b2.在输出中创建文本 b3.控制循环或逻辑 cif语句 {% 表达式 %} 语句 {% elif

05.django升级打怪学习记

迁移文件 *分两步实现 ——生成迁移文件 ——执行迁移文件 *迁移文件的生成 ——根据models文件生成对应的迁移文件 ——根据modules和已迁移文件差别 生成新的迁移文件 *执行迁移文件 ——先去迁移记录查找,哪些文件未迁移过 *app_label + 迁移文件名字 ——执行未迁移的文件 ——执行完毕,记录执行过程的迁移文件 ——重新迁移 *删除迁移文件 *删除迁移文件产生的表 *删除迁移记录 模型关系: 1:1 a.应用场景 b.实现: ——使用外键实现的 ——对外键添加了唯一约束 1

06.django升级打怪学习记

缓存 *提升服务响应速度 *将执行过的操作数据存储下来,再一定时间内,再次获取数据的时候,直接从缓存中获取 *比较理想的方案,缓存使用内存级缓存 *Django内置缓存 例子: 缓存底层 获取cache 缓存操作 缓存原理 a.没有缓存 b.有缓存第一次 c.有缓存不是第一次 中间件 中间件切点: AOP中间件: 实现统计功能 *统计IP *统计浏览器 实现权重控制 *黑名单 *白名单 实现反爬 *反爬虫 *实现频率控制 界面友好化 应用交互友好化 中间件 *调用顺序 ——中间件注册的时候是一个

Django Book

The Django Book 2.0--中文版 第一章:介绍Django 本书所讲的是Django:一个可以使Web开发工作愉快并且高效的Web开发框架. 使用Django,使你能够以最小的代价构建和维护高质量的Web应用. 从好的方面来看,Web 开发激动人心且富于创造性:从另一面来看,它却是份繁琐而令人生厌的工作. 通过减少重复的代码,Django 使你能够专注于 Web 应用上有 趣的关键性的东西. 为了达到这个目标,Django 提供了通用Web开发模式的高度抽象,提供了频繁进行的编程

Python Web框架Django (二)

第二章:入门 由于现代Web开发环境由多个部件组成,安装Django需要几个步骤. 这一章,我们将演示如何安装框架以及一些依赖关系. 因为Django就是纯Python代码,它可以运行在任何Python可以运行的环境,甚至是手机上! 但是这章只提及Django安装的通用脚本. 我们假设你把它安装在桌面/笔记本电脑或服务器. 往后,在第12章,我们将讨论如何部署Django到一个生产站点. Python 安装 Django本身是纯Python编写的,所以安装框架的第一步是确保你已经安装了Pytho