enthought / enthought/traitsui

Adding duplicate Handler Debug command line messages when running wx examples

Open
#1,061 0 comments 0 reactions 0 assignees View on GitHub
component: examples
Dominant language
Python
Stars
306
Forks
99
PR merge metrics
No merged PRs in 30d

Description

When running any of the code examples which use wx toolkit I see strange command line output. For example running
wizard.py, view_multi_object.py, view_standalone.py, and mil_figure_editor.py.

This was mentioned on issue #1051, but warranted being a separate issue.

Examples:
```
$ python mpl_figure_editor.py
10:26:30 AM: Debug: Adding duplicate image handler for 'Windows bitmap file'
10:26:30 AM: Debug: Adding duplicate animation handler for '1' type
10:26:30 AM: Debug: Adding duplicate animation handler for '2' type
10:26:30 AM: Debug: Adding duplicate image handler for 'Windows bitmap file'
10:26:30 AM: Debug: Adding duplicate animation handler for '1' type
10:26:30 AM: Debug: Adding duplicate animation handler for '2' type
10:26:30 AM: Debug: Adding duplicate image handler for 'Windows bitmap file'
10:26:30 AM: Debug: Adding duplicate animation handler for '1' type
10:26:30 AM: Debug: Adding duplicate animation handler for '2' type
```

```
$ python wizard.py
11:02:16 AM: Debug: Adding duplicate image handler for 'Windows bitmap file'
11:02:16 AM: Debug: Adding duplicate animation handler for '1' type
11:02:16 AM: Debug: Adding duplicate animation handler for '2' type
11:02:16 AM: Debug: Adding duplicate image handler for 'Windows bitmap file'
11:02:16 AM: Debug: Adding duplicate animation handler for '1' type
11:02:16 AM: Debug: Adding duplicate animation handler for '2' type
11:02:16 AM: Debug: Adding duplicate image handler for 'Windows bitmap file'
11:02:16 AM: Debug: Adding duplicate animation handler for '1' type
11:02:16 AM: Debug: Adding duplicate animation handler for '2' type
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at /Users/robind/projects/bb2/dist-osx-py36/build/ext/wxWidgets/src/common/wincmn.cpp(475) in ~wxWindowBase(): any pushed event handlers must have been removed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/aayres/Desktop/traitsui/traitsui/wx/view_application.py", line 152, in OnInit
args=self.args,
File "/Users/aayres/Desktop/traitsui/traitsui/view.py", line 462, in ui
ui.ui(parent, kind)
File "/Users/aayres/Desktop/traitsui/traitsui/ui.py", line 246, in ui
self.rebuild(self, parent)
SystemError: PyEval_EvalFrameEx returned a result with an error set
OnInit returned false, exiting...
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.