darknet-ocr icon indicating copy to clipboard operation
darknet-ocr copied to clipboard

UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position...

Open bihuman opened this issue 5 years ago • 2 comments

env: python 3.7.1 web.py==0.40.dev0

problem: return Template(open(path).read(), filename=path, **self._keywords) UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 410: illegal multibyte sequence

temporary solution

open the file lib\site-packages\web\template.py

old: return Template(open(path).read(), filename=path, **self._keywords) new: return Template(open(path,encoding='utf-8').read(), filename=path, **self._keywords)

bihuman avatar Oct 25 '19 13:10 bihuman

有用

zlszhonglongshen avatar Nov 01 '19 07:11 zlszhonglongshen

有用

lanma901106 avatar May 08 '20 06:05 lanma901106