Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#53 closed defect (fixed)

wxPython error w/Analysis

Reported by: flip Owned by:
Priority: minor Milestone:
Component: fitting Version:
Keywords: Cc:


wxPython 3.x gets upset because Analysis (in sets the locale. Traceback below. Apparently wxPython's locale behavior changed in v2.9.5.

Here's the changeset where the call to setlocale() was added:

Here's one of a number of people who had the same unpleasant surprise:

  File "c:\python27\lib\site-packages\vespa\analysis\src\", line 886, in <module>

  File "c:\python27\lib\site-packages\vespa\analysis\src\", line 880, in main
    frame = Main(db, position, size)

  File "c:\python27\lib\site-packages\vespa\analysis\src\", line 134, in __init__

  File "c:\python27\lib\site-packages\vespa\analysis\src\", line 153, in build_panes
    self.notebook_datasets  = notebook_datasets.NotebookDatasets(self, self)

  File "c:\python27\lib\site-packages\vespa\analysis\src\", line 48, in __init__

  File "C:\python27\lib\site-packages\vespa\common\wx_gravy\", line 129, in show_welcome_tab

  File "C:\python27\lib\site-packages\wx-3.0-msw\wx\", line 988, in SetPage
    return _html.HtmlWindow_SetPage(*args, **kwargs)

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!

Change History (2)

comment:1 Changed 5 years ago by flip

  • Resolution set to fixed
  • Status changed from new to closed

We're not sure if this call has any effect other than perhaps respecting people's localized prefs for numbers (e.g. comma & decimal separators). Removing it because (a) it's now causing trouble and (b) if we're going to go to the trouble of respecting localized settings, we ought to do it in a more consistent fashion.

Fixed in 4164

comment:2 Changed 5 years ago by flip

Merged into trunk in r4187

Note: See TracTickets for help on using tickets.