HtmlHelpController.Initialize won't work

Hello,
I am toying with wx.html.HtmlHelpController and I just found out that “Initialize” doesn’t work at all…

class MainFrame(wx.Frame): 
    def __init__(self, *args, **kwargs):
        wx.Frame.__init__(self, *args, **kwargs)
        self.Bind(wx.EVT_HELP, self.on_help)

    def on_help(self, event): # just press "F1" to see the help window
        wx.GetApp().help_controller.DisplayContents()

class MyApp(wx.App):
    def OnInit(self):
        wx.FileSystem.AddHandler(wx.ArchiveFSHandler())
        self.help_controller = wx.html.HtmlHelpController()
        self.help_controller.Initialize('test.zip')  # this won't work
        # self.help_controller.AddBook('test.zip')   # this works fine
        MainFrame(None).Show()
        return True

MyApp().MainLoop()

If you need a zip file to try this snippet, you may use the “test.zip” documentation sample from the wxWidgets repo: https://github.com/wxWidgets/wxWidgets/blob/c42715f0c9defc0834e78e7d68158163845b4c81/samples/html/helpview/test.zip

Now, if you try the “Initialize” API, it doesn’t load the docs into the help window. But, if you try “AddBook” instead, everything works as expected.
This seems a bit funny because “Initialize” will just end up calling “AddBook” anyways… see https://github.com/wxWidgets/wxWidgets/blob/c42715f0c9defc0834e78e7d68158163845b4c81/src/html/helpctrl.cpp#L269

I have a little hesitation in opening a ticket at wxWidgets’, because it seems very odd that nobody noticed such an obvious bug in a code that is now 20 years old… I think I am missing something here…

Could someone please test and confirm this for me? (I’m running the latest nightly build of wxPython on my windows box, but it should be platform-independent…)
Thanks a lot
riccardo

It looks like it is a problem in wxPython, due to not letting SIP know about the implementation of Initialize in the subclasses. I’ll get a fix started.

Oh wow… I never guessed it was a wxPython issue. Uhm, I guess this whole “could you please just add HelpController” business turned out to be a bit of a rabbit hole… sorry for the trouble!
I’ll wait for the next built then… thanks again!
r

No worries. It’s always good to identify and resolve issues.