I greatly appreciate if experts direct me to next step.
I am converting an old database coded in python2 to python3, using 2to3 and taking care of numerous runtime messages.
Now, I have no idea how to cope with this, which ran into SystemError: in python3. Message is
"1x:xx:xx: Debug: Adding duplicate image handler for ‘Windows bitmap file’
wx._core.wxAssertionError: C++ assertion “!GetImageList(wxIMAGE_LIST_SMALL)” failed at …/src/generic/listctrl.cpp(5443) in OnGetItemImage(): List control has an image list, OnGetItemImage or OnGetItemColumnImage should be overridden.
The above exception was the direct cause of the following exception:"
So far, I have not been able to figure out where problematic code is. GetImageList() does not exist within user code. “Adding duplicate…” message may be a clue, but so far unable to narrow down.
I hope I am at right place for this question.
regards
kaz2100
System setting follows:
Linux Debian testing.
python3.9.2
wxpython 4.0.7
Original code works with python2.7.18,with wxpython (?) and/or wxwindows(?),
It’s telling you that a OnGetItemImage is expected, but you don’t have one. It’s expected because the listctrl has an image list, and it is using the wx.LC_VIRTUAL style. if you don’t need to provide an image for each item or for column then you can implement a OnGetItemImage that just returns -1.
I think I was on wrong track. I was searching “duplicate image handler” which I thought caused following messages. The right track is the other way around, “missing OnGetItemImage results in duplicate image handler.”
Now, I know that user needs to implement OnGetItemImage as wx.ListCtrl page in wxpython.org explains. I found wxwdidget (C++) sample here. Do I need to code it in C++?