使用Python帮助时出现SEGFAULT
在使用Python的帮助功能时,我输入了“modules”,结果出现了以下错误:
help> modules
Please wait a moment while I gather a list of all available modules...
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
import gobject._gobject
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
from gtk import _gtk
** (python:12351): CRITICAL **: pyg_register_boxed: assertion `boxed_type != 0' failed
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: cannot register existing type `GdkDevice'
from gtk import _gtk
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed
from gtk import _gtk
Segmentation fault (core dumped)
你可以查看这个链接了解更多信息: https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/896836
我该如何解决这个问题,或者绕过它,以获取我想要的帮助呢?
1 个回答
1
这种“模块列表”(pydoc -k
也是)需要把所有可用的模块都导入到一个进程中,这可能会引发各种问题。所以,不要这样做。
另请查看 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697402