python终止线程报错_退出整个程序时出现python线程异常错误
嗨,伙計們
我正在用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线程异常错误的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 60平米装修多少钱啊?
- 下一篇: smarty mysql demo_PH