Traceback (most recent call last):
File "idle.py", line 14, in <module>
idlelib.PyShell.main()
File "C:\Python27\Lib\idlelib\PyShell.py", line 1591, in main
shell = flist.open_shell()
File "C:\Python27\Lib\idlelib\PyShell.py", line 325, in open_shell
self.pyshell = PyShell(self)
File "C:\Python27\Lib\idlelib\PyShell.py", line 892, in __init__
OutputWindow.__init__(self, flist, None, None)
File "C:\Python27\Lib\idlelib\OutputWindow.py", line 16, in __init__
EditorWindow.__init__(self, *args)
File "C:\Python27\Lib\idlelib\EditorWindow.py", line 262, in __init__
text['font'] = idleConf.GetFont(self.root, 'main', 'EditorWindow')
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1333, in __setitem__
self.configure({key: value})
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1326, in configure
return self._configure('configure', cnf, kw)
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1317, in _configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1178, in _options
nv.append(_stringify(item))
File "C:\Python27\lib\lib-tk\Tkinter.py", line 80, in _stringify
value = unicode(value, 'utf-8')
UnicodeDecodeError: 'utf8' codec can't decode byte 0xd0 in position 0: invalid continuation byte
问题原因:
我之前装了python3,后来又装了python2,可能有些配置没有更改过来
解决方案:
进入C盘->用户目录->administrator(你的用户名) 找到.idlerc文件夹,将其删除,再启动idle就可以了
原文链接blog.csdn.net/potato47