PythonScripter2.7报错ascii codec can't encode characters in position 0-1:ordinal not in range(128)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PythonScripter2.7报错ascii codec can't encode characters in position 0-1:ordinal not in range(128)相关的知识,希望对你有一定的参考价值。
1. 这是Python 2 mimetypes的bug
2. 需要将Python2.7\lib\mimetypes.py文件中如下片段注释或删除:
try:
ctype = ctype.encode(default_encoding) # omit in 3.x!
except UnicodeEncodeError:
pass
以上是关于PythonScripter2.7报错ascii codec can't encode characters in position 0-1:ordinal not in range(128)的主要内容,如果未能解决你的问题,请参考以下文章
python报错问题解决:'ascii' codec can't encode character
python报错UnicodeDecodeError: 'ascii' codec can't decode byte 0x?? in position 1: ordinal
解决这个报错SyntaxError: Non-ASCII character
python报错 UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordi