在执行一个wxpython的时候报错
Traceback (most recent call last):
File "C:\Users\quan\Desktop\wx16.py", line 145, in <module>frame = Frame(None)
File "C:\Users\quan\Desktop\wx16.py", line 18, in __init__
self.createMenuBar()
File "C:\Users\quan\Desktop\wx16.py", line 45, in createMenuBar
menuBar.Append(self.createMenu(menuItem),menuLabel)
File "C:\Users\quan\Desktop\wx16.py", line 57, in createMenu
self.Bind(wx.EVT_MENU,eachHandler,menu)
File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 3918, in Bind
assert source is None or hasattr(source, 'GetId')
AssertionError
下面是有报错的原因和解决的方法
#!/usr/bin/python
#coding:utf8
import wx
#实例化窗口
class Frame(wx.Frame):
def __init__(self, parent):
# 实例话窗口
wx.Frame.