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

Lingering Code Snippet Error in mph_figure_editor.py #1055

Closed
aaronayres35 opened this issue Jul 22, 2020 · 2 comments
Closed

Lingering Code Snippet Error in mph_figure_editor.py #1055

aaronayres35 opened this issue Jul 22, 2020 · 2 comments
Assignees

Comments

@aaronayres35
Copy link
Contributor

aaronayres35 commented Jul 22, 2020

When code is run get very similar error to #828 which includes a fix.

$ python mpl_figure_editor.py
02:22:10 PM: Debug: Adding duplicate image handler for 'Windows bitmap file'
02:22:10 PM: Debug: Adding duplicate animation handler for '1' type
02:22:10 PM: Debug: Adding duplicate animation handler for '2' type
02:22:10 PM: Debug: Adding duplicate image handler for 'Windows bitmap file'
02:22:10 PM: Debug: Adding duplicate animation handler for '1' type
02:22:10 PM: Debug: Adding duplicate animation handler for '2' type
02:22:10 PM: Debug: Adding duplicate image handler for 'Windows bitmap file'
02:22:10 PM: Debug: Adding duplicate animation handler for '1' type
02:22:10 PM: Debug: Adding duplicate animation handler for '2' type
Traceback (most recent call last):
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/wx/view_application.py", line 152, in OnInit
    args=self.args,
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/view.py", line 462, in ui
    ui.ui(parent, kind)
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/ui.py", line 246, in ui
    self.rebuild(self, parent)
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/wx/toolkit.py", line 125, in ui_live
    ui_live.ui_live(ui, parent)
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/wx/ui_live.py", line 52, in ui_live
    _ui_dialog(ui, parent, BaseDialog.NONMODAL)
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/wx/ui_live.py", line 88, in _ui_dialog
    BaseDialog.display_ui(ui, parent, style)
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/wx/ui_base.py", line 71, in display_ui
    ui.owner.init(ui, parent, style)
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/wx/ui_live.py", line 203, in init
    sw = panel(ui, window)
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/wx/ui_panel.py", line 272, in panel
    panel, content[0], ui
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/wx/ui_panel.py", line 431, in fill_panel_for_group
    panel, group, ui, suppress_label, is_dock_window, create_panel
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/wx/ui_panel.py", line 587, in __init__
    self.add_items(content, panel, self.sizer)
  File "/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/wx/ui_panel.py", line 1015, in add_items
    max(0, border_size + padding + item.padding),
wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_CENTRE_VERTICAL)" failed at /Users/robind/projects/bb2/dist-osx-py36/build/ext/wxWidgets/src/common/sizer.cpp(2077) in DoInsert(): Vertical alignment flags are ignored in vertical sizers
OnInit returned false, exiting...

The change that #828 suggests, seems to have been already made by PR #829, but somehow I still see this error here.

Also this error was a part of the problems mentioned in issue #1036 but was not addressed in PR #1044

@aaronayres35
Copy link
Contributor Author

In my repo, this line is changed, but when I follow the link to

"/Users/aayres/.edm/envs/general-use/lib/python3.6/site-packages/traitsui/wx/ui_panel.py", line 1015

that is given in the traceback, I see that this change has not been made. Is this because this change hasn't been put into the latest release or something?
Could you possibly explain to me why these two (my ui_panel.py file in my local repo and file that was linked in traceback) might be different tomorrow @rahulporuri ?

@aaronayres35 aaronayres35 self-assigned this Jul 22, 2020
@aaronayres35
Copy link
Contributor Author

This was due to a local environment issue. This was fixed by #829

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

No branches or pull requests

1 participant