嗨,伙计们
我正在用python2.4.3和wxpython开发一个GUI。除了退出主程序(关闭GUI的主窗口)之外,一切正常。最重要的是,有时会有这样的错误,有时根本就没有错误。尽管我从python邮件列表中找到了相同的错误报告(链接是http://bugs.python.org/issue1722344),但我不确定我的情况是否与本例相同。我不知道这最后是怎么解决的,我该怎么做才能克服这个问题。在
来自控制台的错误消息如下。在Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File "/usr/lib/python2.4/threading.py", line 442, in __bootstrap
File "/opt/company/workspace/username/application/src/mainwidget.py", line 1066, in run
File "/usr/lib/python2.4/Queue.py", line 89, in put
File "/usr/lib/python2.4/threading.py", line 237, in notify
exceptions.TypeError: exceptions must be classes, instances, or strings (deprecated), not NoneType
Unhandled exception in thread started by
Error in sys.excepthook:
Original exception was:
以下是我的代码的一部分(线程相关的代码已经完成,剩下的我提取主要操作)。当我使用GUI启动外部子进程时,同时wx.TextCtrl对象已创建。这个wx.TextCtrl对象用于提供外部子进程的输入和打印输出
^{pr2}$
最后
以上就是贪玩老虎最近收集整理的关于python终止线程报错_退出整个程序时出现python线程异常错误的全部内容,更多相关python终止线程报错_退出整个程序时出现python线程异常错误内容请搜索靠谱客的其他文章。
发表评论 取消回复