首页 > 编程语言 > 详细

wxpython应用启动报错You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.

时间:2015-05-07 11:49:04      阅读:1827      评论:0      收藏:0      [点我收藏+]
 File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\_controls.py", line 6523, in __init__
    _controls_.DatePickerCtrl_swiginit(self,_controls_.new_DatePickerCtrl(*args, **kwargs))
wx._core.PyAssertionError: C++ assertion "strcmp(setlocale(LC_ALL, NULL), "C") == 0" failed at ..\..\src\common\intl.cpp(1449) 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!



解决方法:
class MyApp(wx.App):
def OnInit(self): self.locale = wx.Locale(wx.LANGUAGE_ENGLISH)

  

http://stackoverflow.com/questions/21444951/wxpython-3-0-breaks-older-apps-locale-error

wxpython应用启动报错You probably called setlocale() directly instead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.

原文:http://www.cnblogs.com/huangjianan/p/4484156.html

(0)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!