Skip to content

A problem occurred when laughing in VS code:Any pushed event handlers must have been removed #134

Open

Description

@selfpowerful

(ImageProcessing) F:\Users>imagepy
ipy
Traceback (most recent call last):
File "E:\Program Files\Python38\lib\runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "E:\Program Files\Python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "E:\Program Files\Python38\env\ImageProcessing\Scripts\imagepy.exe_main
.py", line 7, in
File "e:\program files\python38\env\imageprocessing\lib\site-packages\imagepy_init
.py", line 31, in
show
ImagePy(None).Show()
File "e:\program files\python38\env\imageprocessing\lib\site-packages\imagepy\ui\mainframe.py", line 52, in init
if IPy.uimode()=='ipy': self.load_aui()
File "e:\program files\python38\env\imageprocessing\lib\site-packages\imagepy\ui\mainframe.py", line 96, in load_aui
self.widgets = widgetsloader.build_widgets(self, 'widgets', 'plugins')
File "e:\program files\python38\env\imageprocessing\lib\site-packages\imagepy\ui\widgetsloader.py", line 34, in build_widgets
return build_widgets_panel(parent, datas, panel)
File "e:\program files\python38\env\imageprocessing\lib\site-packages\imagepy\ui\widgetsloader.py", line 21, in build_widgets_panel
build_widget(choicebook, i)
File "e:\program files\python38\env\imageprocessing\lib\site-packages\imagepy\ui\widgetsloader.py", line 10, in build_widget
parent.AddPage(i(parent), i.title, False )
File "e:\program files\python38\env\imageprocessing\lib\site-packages\imagepy\widgets\histogram\histogram_wgt.py", line 17, in init
self.sli_high = FloatSlider(self, (0,255), 0, '')
File "e:\program files\python38\env\imageprocessing\lib\site-packages\imagepy\ui\widgets\normal.py", line 283, in init
subsizer.Add( self.spin, 0, wx.ALIGN_CENTER|wx.BOTTOM|wx.EXPAND, 5 )
wx._core.wxAssertionError: C++ assertion "!(flags & (wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL))" failed at ....\src\common\sizer.cpp(2114) in wxBoxSizer::DoInsert(): Vertical alignment flags are ignored with wxEXPAND
Error in atexit._run_exitfuncs:
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ....\src\common\wincmn.cpp(475) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed

Activity

  1. Cooperoh commented on Aug 12, 2020

    @Cooperoh

    same

  2. leiwang1023 commented on Aug 15, 2020

    @leiwang1023

    +1

  3. sheldonxxd commented on Sep 14, 2020

    @sheldonxxd

    same, then I replace the wx.EXPAND to wx.RIGHT, the GUI could be displayed at least.
    File "e:\program files\python38\env\imageprocessing\lib\site-packages\imagepy\ui\widgets\normal.py", line 283, in init
    subsizer.Add( self.spin, 0, wx.ALIGN_CENTER|wx.BOTTOM|wx.EXPAND, 5 )
    image

    BUT there are still problems as below:

    Traceback (most recent call last):
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\histpanel.py", line 27, in on_size
        self.init_buf()
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\histpanel.py", line 24, in init_buf
        self.buffer = wx.Bitmap(box.width, box.height)
    wx._core.wxAssertionError: C++ assertion ""w > 0 && h > 0"" failed at ..\..\src\msw\bitmap.cpp(754) in wxBitmap::DoCreate(): invalid bitmap size
    Traceback (most recent call last):
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\cmappanel.py", line 48, in on_size
        self.init_buf()
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\cmappanel.py", line 35, in init_buf
        self.buffer = wx.Bitmap(box.width, box.height)
    wx._core.wxAssertionError: C++ assertion ""w > 0 && h > 0"" failed at ..\..\src\msw\bitmap.cpp(754) in wxBitmap::DoCreate(): invalid bitmap size
    Traceback (most recent call last):
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\histpanel.py", line 27, in on_size
        self.init_buf()
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\histpanel.py", line 24, in init_buf
        self.buffer = wx.Bitmap(box.width, box.height)
    wx._core.wxAssertionError: C++ assertion ""w > 0 && h > 0"" failed at ..\..\src\msw\bitmap.cpp(754) in wxBitmap::DoCreate(): invalid bitmap size
    Traceback (most recent call last):
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\cmappanel.py", line 48, in on_size
        self.init_buf()
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\cmappanel.py", line 35, in init_buf
        self.buffer = wx.Bitmap(box.width, box.height)
    wx._core.wxAssertionError: C++ assertion ""w > 0 && h > 0"" failed at ..\..\src\msw\bitmap.cpp(754) in wxBitmap::DoCreate(): invalid bitmap size
    Traceback (most recent call last):
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\curvepanel.py", line 43, in on_size
        self.init_buf()
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\curvepanel.py", line 40, in init_buf
        self.buffer = wx.Bitmap(box.width, box.height)
    wx._core.wxAssertionError: C++ assertion ""w > 0 && h > 0"" failed at ..\..\src\msw\bitmap.cpp(754) in wxBitmap::DoCreate(): invalid bitmap size
    Traceback (most recent call last):
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\curvepanel.py", line 43, in on_size
        self.init_buf()
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\curvepanel.py", line 40, in init_buf
        self.buffer = wx.Bitmap(box.width, box.height)
    wx._core.wxAssertionError: C++ assertion ""w > 0 && h > 0"" failed at ..\..\src\msw\bitmap.cpp(754) in wxBitmap::DoCreate(): invalid bitmap size
    Traceback (most recent call last):
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\viewport.py", line 38, in on_size
        self.init_buf()
      File "c:\users\xxd\anaconda3\lib\site-packages\imagepy\ui\widgets\viewport.py", line 35, in init_buf
        self.buffer = wx.Bitmap(box.width, box.height)
    wx._core.wxAssertionError: C++ assertion ""w > 0 && h > 0"" failed at ..\..\src\msw\bitmap.cpp(754) in wxBitmap::DoCreate(): invalid bitmap size
    
  4. strongsonn commented on Nov 2, 2020

    @strongsonn

    +1

  5. yxdragon commented on Nov 8, 2020

    @yxdragon
    Member

    Hi all, Sorry for not reply for a long time. as I can run with vs code successfully:
    image
    about the wx's error:
    try the newest github's code and update wxpython!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions