cutright / DVH-Analytics

A DICOM Database Application for Radiation Oncology
Other
82 stars 30 forks source link

wxAssertionError while using python 3.8.5 and wxpython 4.1.1 #158

Closed ThirumuruganE closed 3 years ago

ThirumuruganE commented 3 years ago

I have attached the error below.

wx._core.wxAssertionError: C++ assertion "strcmp(setlocale(0, 0), "C") == 0" failed at ....\src\common\intl.cpp(1694) in wxLocale::GetInfo(): You probably called setlocale() directly ins tead of using wxLocale and now there is a mismatch between C/C++ and Windows locale.

I have resolved the issue by adding 2 lines under class MainApp. import locale locale.setlocale(locale.LC_ALL, 'C')

I would like to share this issue with you @cutright . I thought it might be helpful for someone facing same issue. Thanks.

cutright commented 3 years ago

Thanks! This has been a thorn in my side for a long time. I've tried to address it through wxpython functionality. I've never been able to find a universal solution unfortunately. And I only need wxpython 4.1.1 for Windows users so they can tap into a Chromium web backend.
https://docs.wxpython.org/MigrationGuide.html#possible-locale-mismatch-on-windows

I'll be sure to do some testing with your suggestion.