我偶尔(看似随意)得到以下错误,因为我打开PythonWin:
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\intpyapp.py", line 181, in InitInstance
import interact
File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\interact.py", line 31, in <module>
import winout
File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\winout.py", line 233, in <module>
import pywin.scintilla.view
File "C:\Python27\Lib\site-packages\pythonwin\pywin\scintilla\view.py", line 722, in <module>
LoadConfiguration()
File "C:\Python27\Lib\site-packages\pythonwin\pywin\scintilla\view.py", line 708, in LoadConfiguration
configManager = ConfigManager(configName)
File "C:\Python27\Lib\site-packages\pythonwin\pywin\scintilla\config.py", line 123, in __init__
line, lineno = self._load_keys(subsection, fp, lineno)
File "C:\Python27\Lib\site-packages\pythonwin\pywin\scintilla\config.py", line 270, in _load_keys
sc, flag = keycodes.parse_key_name(key)
File "C:\Python27\Lib\site-packages\pythonwin\pywin\scintilla\keycodes.py", line 91, in parse_key_name
return vk, flags | this_flags
TypeError: unsupported operand type(s) for |: 'int' and 'NoneType'
有时关闭IDE并打开它可以解决问题,有时我需要等待一段时间才能这样做,有时候我必须重启我的电脑。
我正在使用pywin32 build 219
,并在Windows 10上运行。
任何想法如何解决这一问题都将非常感激。
谢谢。
答案 0 :(得分:2)
我有同样的问题。它还没有修好。但是以下解决方法可靠地帮助:在运行PythonWin之前将键盘布局切换为英语,它将成功启动。一直在为我工作。