6

欢迎来到 Python 2.7!这是联机帮助实用程序。...

>> help()

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:9642): 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
durrantm.../dmWorkflow$ 
4

1 回答 1

5

help不幸的是,这是在 Python 上使用时的一个已知问题。它目前必须导入模块来检查它们的文档字符串,如果模块在导入时执行代码并调用期望特定执行上下文或可能只是错误的第三方库,这可能会导致崩溃。这是一个关于这个特定案例的开放 Ubuntu 问题。Python 问题跟踪器中有许多关于由于help导入导致的类似崩溃的未解决问题。

于 2012-09-01T01:00:04.380 回答