0
votes

Ok so I'm working with wxPython with a friend of mine, now it just so happened that he implemented a new picture into the script and its working just fine for him. But if he sends the project to me I get the error:

"wx._core.wxAssertionError: C++ assertion "strcmp(setlocale(LC_ALL, NULL), "C") == 0" failed at ....\src\common\intl.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!"

The code in the line that breaks is the following:png2 = wx.Image("BlackBorder.png", wx.BITMAP_TYPE_ANY).ConvertToBitmap() this lies inside the __init__(self) method for wxPython

It doesnt really tell me what is wrong I feel like so I really appreciate any help.

1

1 Answers

0
votes

IIRC, there are some versions of the PNG library that call setlocale in some situations. Try explicitly creating and holding a wx.Locale object at the start of your application and see if that helps.