码迷,mamicode.com
首页 > 编程语言 > 详细

PythonScripter2.7报错ascii codec can't encode characters in position 0-1:ordinal not in range(128)

时间:2016-09-22 19:53:09      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:

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)

标签:

原文地址:http://www.cnblogs.com/maxomnis/p/5897576.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!