Sphinx can't run 'make html'

|▌冷眼眸甩不掉的悲伤 提交于 2020-02-05 04:20:11

问题


I'm trying to create the documentation for my software by sphinx tool, so i've run sphinx-quickstart, and it's gone all ok.

Then i have to run make html (inside doc folder just created) and i get an error. I don't know how to fix this error:

Running Sphinx v1.2.2
loading pickled environment... not yet created
building [html]: targets for 1 source files that are out of date
updating environment: 1 added, 0 changed, 0 removed
reading sources... [100%] index                                                 
** (sphinx-build:2390): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
/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: specified class size for type 'PyGtkGenericCellRenderer' is smaller than the parent type's 'GtkCellRenderer' class size
  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
make: *** [html] Ucciso

I've surfed the web and i prompted help('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

Can you help me please?


回答1:


A bit of research suggests there are two problems here, which may or may not be related to each other but are both related to Ubuntu, which I think you must be running.

  1. The "accessibility bus" may not be available if you haven't enabled Ubuntu's accessibility features. If you don't plan to do this, the simple workaround is to run

    export NO_AT_BRIDGE=1

    at the shell prompt before running Sphinx. Alternatively you can add this setting under /etc/env.d and restart to make it permanent.

    With luck this will solve the entire problem, but in the likely case it doesn't:

  2. There is a known issue with PyGTK on recent versions of Ubuntu that can produce the GTK warnings you're seeing (and frequently a segmentation fault as well). This apparently has to do with PyGTK transitioning from static to dynamic binding against the GTK library; if you create a situation where software attempts to use both types of binding simultaneously, it can trigger this problem.

    Apart from some ideas to try in the bug report it seems there is no good solution yet.



来源:https://stackoverflow.com/questions/24877382/sphinx-cant-run-make-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!