python帮助>>模块给出分段错误如何修复?

2024-09-26 17:52:37 发布

您现在位置:Python中文网/ 问答频道 /正文

欢迎使用Python2.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$ 

Tags: namefrompyimportregistergtklibpackages
1条回答
网友
1楼 · 发布于 2024-09-26 17:52:37

不幸的是,在Python上使用help时,这是一个已知的问题。它目前必须导入模块来检查它们的docstring,如果模块在导入时执行代码并调用第三方库(这些库需要特定的执行上下文,或者可能是错误的),那么这可能会导致崩溃。这是一个关于这个具体案例的open Ubuntu issue。在Python issue tracker中有许多关于help导入导致的类似崩溃的未决问题。在

相关问题 更多 >

    热门问题