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

I had a problem when launching from a batch file: wx._core.wxAssertionError #140

Open
GSLSK0626 opened this issue Nov 27, 2020 · 3 comments

Comments

@GSLSK0626
Copy link

C:\Users\fp-user>C:\Users\fp-user\Desktop\imagepy-0.2\ImagePy.bat

C:\Users\fp-user>python -m imagepy
ipy
Traceback (most recent call last):
File "C:\Users\fp-user\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\fp-user\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\fp-user\AppData\Local\Programs\Python\Python38\lib\site-packages\imagepy_main
.py", line 4, in
imagepy.show()
File "C:\Users\fp-user\AppData\Local\Programs\Python\Python38\lib\site-packages\imagepy_init
.py", line 31, in show
ImagePy(None).Show()
File "C:\Users\fp-user\AppData\Local\Programs\Python\Python38\lib\site-packages\imagepy\ui\mainframe.py", line 52, in init
if IPy.uimode()=='ipy': self.load_aui()
File "C:\Users\fp-user\AppData\Local\Programs\Python\Python38\lib\site-packages\imagepy\ui\mainframe.py", line 96, in load_aui
self.widgets = widgetsloader.build_widgets(self, 'widgets', 'plugins')
File "C:\Users\fp-user\AppData\Local\Programs\Python\Python38\lib\site-packages\imagepy\ui\widgetsloader.py", line 34, in build_widgets
return build_widgets_panel(parent, datas, panel)
File "C:\Users\fp-user\AppData\Local\Programs\Python\Python38\lib\site-packages\imagepy\ui\widgetsloader.py", line 21, in build_widgets_panel
build_widget(choicebook, i)
File "C:\Users\fp-user\AppData\Local\Programs\Python\Python38\lib\site-packages\imagepy\ui\widgetsloader.py", line 10, in build_widget
parent.AddPage(i(parent), i.title, False )
File "C:\Users\fp-user\AppData\Local\Programs\Python\Python38\lib\site-packages\imagepy\widgets\histogram\histogram_wgt.py", line 17, in init
self.sli_high = FloatSlider(self, (0,255), 0, '')
File "C:\Users\fp-user\AppData\Local\Programs\Python\Python38\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(2184) 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(470) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed

I'm using a batch file downloaded from Github and wxpython was the latest version.

@duolanda
Copy link

duolanda commented Mar 3, 2021

same error here

@qixinbo
Copy link
Member

qixinbo commented Mar 4, 2021

Which version is your wxPython?
if it is 4.1, please switch it to 4.0.7.

@duolanda
Copy link

duolanda commented Mar 5, 2021

Which version is your wxPython?
if it is 4.1, please switch it to 4.0.7.

Thanks for your answer, it works!

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

3 participants