1、問題描述
- ride.py啓動失敗,提示信息如下
- 各版本安裝包如下
2、問題處理
- 找到D:\Program Files\Python3.7.1_x64\Lib\site-packages\robotide\contrib\testrunner\testrunnerplugin.py
- 修改以下代碼
- 下面是修改前的代碼
def _create_font(self):
font=wx.SystemSettings.GetFont(wx.SYS_ANSI_FIXED_FONT)
if not font.IsFixedWidth():
# fixed width fonts are typically a little bigger than their
# variable width peers so subtract one from the point size.
font = wx.Font(font.GetPointSize()-1, wx.FONTFAMILY_MODERN,
wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
return font
- 修改後代碼如下
def _create_font(self):
#font= wx.SystemSettings.GetFont(wx.SYS_ANSI_FIXED_FONT) #這是默認的,會報錯
#set a number in [0-8,10,13],then run ride successfully,SYS_SYSTEM_FONT=13,represents system font
#在[0-8,10,13]中設置一個數字,然後成功運行ride,SYS_SYSTEM_FONT=13,表示系統字體
font = wx.SystemSettings.GetFont(wx.SYS_SYSTEM_FONT)
if not font.IsFixedWidth():
# fixed width fonts are typically a little bigger than their
# variable width peers so subtract one from the point size.
font = wx.Font(font.GetPointSize()-1, wx.FONTFAMILY_MODERN,
wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
return font