Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wx._core.PyAssertionError ... wxGetStockLabel(): invalid stock item ID #3995

Merged
merged 1 commit into from Jan 13, 2015
Merged

Conversation

cgohlke
Copy link
Contributor

@cgohlke cgohlke commented Jan 13, 2015

Using wxPython 3.0.2 on Windows, the mathtext_wx.py example fails:

  File "mathtext_wx.py", line 122, in <module>
    app = MyApp()
  File "X:\Python27-x64\lib\site-packages\wx-3.0-msw\wx\_core.py", line 8628, in __init__
    self._BootstrapApp()
  File "X:\Python27-x64\lib\site-packages\wx-3.0-msw\wx\_core.py", line 8196, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "mathtext_wx.py", line 117, in OnInit
    frame = CanvasFrame(None, "wxPython mathtext demo app")
  File "mathtext_wx.py", line 65, in __init__
    item = wx.MenuItem(menu, 1000 + i, "")
  File "X:\Python27-x64\lib\site-packages\wx-3.0-msw\wx\_core.py", line 12435, in __init__
    _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs))
wx._core.PyAssertionError: C++ assertion "Assert failure" failed at ..\..\src\common\stockitem.cpp(213) in wxGetStockLabel(): invalid stock item ID

Apparently, if no or an empty label is given to wx.MenuItem it assumes to use a stock item.

@tacaswell tacaswell added this to the v1.5.x milestone Jan 13, 2015
@tacaswell
Copy link
Member

Happens on linux too

tacaswell added a commit that referenced this pull request Jan 13, 2015
BUG : Fix wx._core.PyAssertionError ... wxGetStockLabel(): invalid stock item ID
@tacaswell tacaswell merged commit c47de0e into matplotlib:master Jan 13, 2015
tacaswell added a commit that referenced this pull request Jan 13, 2015
BUG : Fix wx._core.PyAssertionError ... wxGetStockLabel(): invalid stock item ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants