wx.Image is throwing PyAssertionError
问题 I ran the following python code import wx class myframe(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, title="Hello") self.InitUI() def InitUI(self): menubar = wx.MenuBar() fileMenu = wx.Menu() qmi = wx.MenuItem(fileMenu, 100, '&Quit\tCtrl+Q') qmi.SetBitmap(wx.Image('quit.png', wx.BITMAP_TYPE_ANY).ConvertToBitmap()) fileMenu.AppendItem(qmi) self.Bind(wx.EVT_MENU, self.OnQuit, id=100) menubar.Append(fileMenu, '&File') self.SetMenuBar(menubar) self.SetSize((250, 200)) self