wxpython 在执行的时候报错

在尝试运行wxPython程序时遇到AssertionError。错误通常源于内部断言检查失败。解决方法涉及排查代码逻辑或更新库版本。
摘要由CSDN通过智能技术生成

在执行一个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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值