Wxpython Application Start error you probably called setlocale () directly instead of using Wxlocale and now there is a mismatch between C + + and Windows locale.

Source: Internet
Author: User

 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 application Start error probably called setlocale () directly instead of using Wxlocale and now there is a mismatch between C/ C + + and Windows locale.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.