美文网首页
Django2.2报错合集

Django2.2报错合集

作者: aport | 来源:发表于2019-11-06 10:48 被阅读0次
  • 持续更新
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 9737: illegal multibyte sequence

解决方案:

打开\Lib\site-packages\django\views下的debug.py文件,转到line331行:

   with Path(CURRENT_DIR, 'templates', 'technical_500.html').open() as fh

  将其改成:

    with Path(CURRENT_DIR, 'templates', 'technical_500.html').open(encoding="utf-8") as fh

就成功了。

相关文章

网友评论

      本文标题:Django2.2报错合集

      本文链接:https://www.haomeiwen.com/subject/lltubctx.html