• ride.py 启动报错


    报错问题:

    C:Usersiphauser>ride.py
    Traceback (most recent call last):
      File "d:softpython36libsite-packages
    obotideapplicationapplication.py", line 59, in OnInit
        self._plugin_loader.enable_plugins()
      File "d:softpython36libsite-packages
    obotideapplicationpluginloader.py", line 43, in enable_plugins
        p.enable_on_startup()
      File "d:softpython36libsite-packages
    obotideapplicationpluginconnector.py", line 52, in enable_on_startup
        self.enable()
      File "d:softpython36libsite-packages
    obotideapplicationpluginconnector.py", line 57, in enable
        self._plugin.enable()
      File "d:softpython36libsite-packages
    obotidecontrib	estrunner	estrunnerplugin.py", line 162, in enable
        self._build_ui()
      File "d:softpython36libsite-packages
    obotidecontrib	estrunner	estrunnerplugin.py", line 558, in _build_ui
        self._build_notebook_tab()
      File "d:softpython36libsite-packages
    obotidecontrib	estrunner	estrunnerplugin.py", line 734, in _build_notebook_tab
        self.out = self._create_output_textctrl()
      File "d:softpython36libsite-packages
    obotidecontrib	estrunner	estrunnerplugin.py", line 769, in _create_output_textctrl
        font = self._create_font()
      File "d:softpython36libsite-packages
    obotidecontrib	estrunner	estrunnerplugin.py", line 789, in _create_font
        font=wx.SystemSettings.GetFont(wx.SYS_ANSI_FIXED_FONT)
    wx._core.wxAssertionError: C++ assertion "wxFontEnumerator::IsValidFacename(font.GetFaceName())" failed at ....srcmswsettings.cpp(301) in wxSystemSettingsNative::GetFont():
    OnInit returned false, exiting...
    Error in atexit._run_exitfuncs:
    wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ....srccommonwincmn.cpp(478) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed

    解决办法:找到python3.6.6Libsite-packages obotidecontrib estrunner estrunnerplugin.py文件,修改_create_font函数

    修改后的代码为:

        def _create_font(self):
            #font=wx.SystemSettings.GetFont(wx.SYS_ANSI_FIXED_FONT) #default font has error
            font = wx.SystemSettings.GetFont(wx.SYS_SYSTEM_FONT) #set a number in [0-8,10,13],then run ride successfully,SYS_SYSTEM_FONT=13,represents 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

    参考:https://blog.csdn.net/u011127242/article/details/88864476

  • 相关阅读:
    DeepLearning.ai学习笔记(二)改善深层神经网络:超参数调试、正则化以及优化--Week2优化算法
    DeepLearning.ai学习笔记(二)改善深层神经网络:超参数调试、正则化以及优化--Week1深度学习的实用层面
    通俗理解决策树中的熵&条件熵&信息增益
    KNN实现手写数字识别
    softmax分类算法原理(用python实现)
    DeepLearning.ai学习笔记(一)神经网络和深度学习--Week4深层神经网络
    博客园自定义皮肤扁平化设计
    神经网络权重初始化问题
    OpenVirteX 安装
    从个人的角度谈谈本次GNTC大会的收获
  • 原文地址:https://www.cnblogs.com/wang-mengmeng/p/11393700.html
Copyright © 2020-2023  润新知