1 2 3 4

UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 9737: ill....

1、报错:

UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 9737: illegal multibyte sequence

  

2、解决:

  打开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
就成功了。

  

posted @ 2019-12-08 21:57  犹豫就会拜佛  阅读(2707)  评论(0编辑  收藏  举报