#53 closed defect (fixed)
wxPython 3.0.2.0 error w/Analysis
Reported by: | flip | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | fitting | Version: | |
Keywords: | Cc: |
Description
wxPython 3.x gets upset because Analysis (in util_voigt.py) 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:
https://scion.duhs.duke.edu/vespa/project/changeset/2377/trunk/analysis/src/util_voigt.py
Here's one of a number of people who had the same unpleasant surprise:
http://stackoverflow.com/questions/21444951/wxpython-3-0-breaks-older-apps-locale-error
File "c:\python27\lib\site-packages\vespa\analysis\src\main.py", line 886, in <module> main() File "c:\python27\lib\site-packages\vespa\analysis\src\main.py", line 880, in main frame = Main(db, position, size) File "c:\python27\lib\site-packages\vespa\analysis\src\main.py", line 134, in __init__ self.build_panes() File "c:\python27\lib\site-packages\vespa\analysis\src\main.py", line 153, in build_panes self.notebook_datasets = notebook_datasets.NotebookDatasets(self, self) File "c:\python27\lib\site-packages\vespa\analysis\src\notebook_datasets.py", line 48, in __init__ self.show_welcome_tab() File "C:\python27\lib\site-packages\vespa\common\wx_gravy\notebooks.py", line 129, in show_welcome_tab html_control.SetPage(self.WELCOME_TAB_TEXT) File "C:\python27\lib\site-packages\wx-3.0-msw\wx\html.py", 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
comment:2 Changed 5 years ago by flip
Merged into trunk in r4187
Note: See
TracTickets for help on using
tickets.
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
https://scion.duhs.duke.edu/vespa/project/changeset/4164