我是靠谱客的博主 标致心锁,最近开发中收集的这篇文章主要介绍wx._core.wxAssertionError: C++ assertion “GetEventHandler() == this“ failed at ..\..\src\common\winc,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

运行ride.py报错:

Traceback (most recent call last):
File "E:workspacepython386libsite-packagesrobotideapplicationapplication.py", line 58, in OnInit
self.frame = RideFrame(self, self._controller)
File "E:workspacepython386libsite-packagesrobotideuimainframe.py", line 175, in __init__
self._init_ui()
File "E:workspacepython386libsite-packagesrobotideuimainframe.py", line 279, in _init_ui
self.tree = Tree(self, self.actions,
File "E:workspacepython386libsite-packagesrobotideuitree.py", line 86, in __init__
self._images = TreeImageList()
File "E:workspacepython386libsite-packagesrobotideuiimages.py", line 42, in __init__
TestCaseController: _TreeImage(self, 'robot.png'),
File "E:workspacepython386libsite-packagesrobotideuiimages.py", line 80, in __init__
self.normal = self._get_image(image_list, normal)
File "E:workspacepython386libsite-packagesrobotideuiimages.py", line 91, in _get_image
img = wx.Image(path, wx.BITMAP_TYPE_PNG).ConvertToBitmap()
wx._core.wxAssertionError: C++ assertion "strcmp(setlocale(LC_ALL, NULL), "C") == 0" failed at ....srccommonintl.cpp(1579) in wxLocale::GetInfo(): You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.
Things are going to break, please only change locale by creating wxLocale objects to avoid this!
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

解决办法:
打开E:workspacepython386libsite-packagesrobotideapplicationapplication.py文档,修改

self._initial_locale = wx.Locale(wx.LANGUAGE_ENGLISH)

self.locale = wx.Locale(wx.LANGUAGE_ENGLISH)

重新运行python ride.py就好了

最后

以上就是标致心锁为你收集整理的wx._core.wxAssertionError: C++ assertion “GetEventHandler() == this“ failed at ..\..\src\common\winc的全部内容,希望文章能够帮你解决wx._core.wxAssertionError: C++ assertion “GetEventHandler() == this“ failed at ..\..\src\common\winc所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(47)

评论列表共有 0 条评论

立即
投稿
返回
顶部