Python 使用PyQt线程时出现问题-接收GTK错误

Python 使用PyQt线程时出现问题-接收GTK错误,python,pyqt,qthread,Python,Pyqt,Qthread,我几乎成功地编写了我的简单torrent客户端,但又出现了一些可怕的问题。 下面是代码的链接: 当我打开此应用程序时,它有时运行非常正常,但我经常收到如下错误: (python:8149): Gtk-CRITICAL **: IA__gtk_widget_get_visible: assertion `GTK_IS_WIDGET (widget)' failed (python:8149): Gtk-CRITICAL **: gtk_tree_model_filter_iter_next:

我几乎成功地编写了我的简单torrent客户端,但又出现了一些可怕的问题。
下面是代码的链接:

当我打开此应用程序时,它有时运行非常正常,但我经常收到如下错误:

(python:8149): Gtk-CRITICAL **: IA__gtk_widget_get_visible: assertion `GTK_IS_WIDGET (widget)' failed

(python:8149): Gtk-CRITICAL **: gtk_tree_model_filter_iter_next: assertion `GTK_TREE_MODEL_FILTER (model)->priv->stamp == iter->stamp' failed

(python:8149): Gtk-CRITICAL **: /build/buildd/gtk+2.0-2.24.17/gtk/gtktreeview.c:6305 (do_validate_rows): assertion `gtk_tree_model_iter_next (tree_view->priv->model, &iter)' failed.
There is a disparity between the internal view of the GtkTreeView,
and the GtkTreeModel.  This generally means that the model has changed
without letting the view know.  Any display from now on is likely to
be incorrect.

[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
(python:8131): Gtk-CRITICAL **: IA__gtk_widget_get_visible: assertion `GTK_IS_WIDGET (widget)' failed
或者像这样:

(python:8149): Gtk-CRITICAL **: IA__gtk_widget_get_visible: assertion `GTK_IS_WIDGET (widget)' failed

(python:8149): Gtk-CRITICAL **: gtk_tree_model_filter_iter_next: assertion `GTK_TREE_MODEL_FILTER (model)->priv->stamp == iter->stamp' failed

(python:8149): Gtk-CRITICAL **: /build/buildd/gtk+2.0-2.24.17/gtk/gtktreeview.c:6305 (do_validate_rows): assertion `gtk_tree_model_iter_next (tree_view->priv->model, &iter)' failed.
There is a disparity between the internal view of the GtkTreeView,
and the GtkTreeModel.  This generally means that the model has changed
without letting the view know.  Any display from now on is likely to
be incorrect.

[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
(python:8131): Gtk-CRITICAL **: IA__gtk_widget_get_visible: assertion `GTK_IS_WIDGET (widget)' failed
或者这个:

Xlib: sequence lost (0x1032d > 0x338) in reply type 0x1c!

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
我怀疑Qt线程有故障,但不知道如何修复。
让我吃惊的是——这些错误是关于一些GTK的东西,我甚至没有在我的应用程序中使用它们。

你在运行哪个操作系统?如果它是基于ubuntu或ubuntu的,或者操作系统使用的shell是使用GTK编写的,那么这些错误在所有应用程序中都很常见。只要你的应用程序正常运行,你就可以安全地忽略它们