Skip to content

Commit

Permalink
UnicodeDecodeError
Browse files Browse the repository at this point in the history
Fix bug for #UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 1968: illegal multibyte sequence#
  • Loading branch information
ShenDezhou authored Sep 6, 2019
1 parent 688e091 commit 67f9557
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _load_meta(path):
req_path = str(meta['requirements'])[7:]
req_path = join(src_dir, req_path)
if exists(req_path):
reqs = open(req_path, 'r').read().strip().split('\n')
reqs = open(req_path, 'r', encoding='utf-8').read().strip().split('\n')
reqs = [req.strip() for req in reqs if 'git+' not in req]
meta['requirements'] = reqs
else:
Expand All @@ -39,7 +39,7 @@ def _load_meta(path):
readme_path = str(meta['long_description'])[7:]
readme_path = join(src_dir, readme_path)
if exists(readme_path):
readme = open(readme_path, 'r').read().strip()
readme = open(readme_path, 'r', encoding='utf-8').read().strip()
meta['long_description'] = readme
else:
meta['long_description'] = ''
Expand Down

0 comments on commit 67f9557

Please sign in to comment.