1.报错信息
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 9737: illegal multibyte sequence
2.解决 debug.py文件中331行显示
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:
3.之后运行有报错
django.template.exceptions.TemplateDoesNotExist: indes.html
4.解决 在setting.py中找到
'DIRS': [base_DIR / 'templates']
改为
'DIRS': ["%s/%s" %(base_DIR,'templates'),]
5.运行成功
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)