运行狮身人面像html make在阅读源代码后卡住



我第一次尝试使用狮身人面像从代码中的文档字符串中获取文档。我目前正在使用 pycharm 来运行狮身人面像任务,但我在命令行上也没有运气。问题是该进程在没有返回任何错误的情况下被击中:

Running Sphinx v1.2.2
loading pickled environment... done
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] index

然后什么都没有。

试图遵循在线提供的狮身人面像文档和指南,但也许我弄错了什么。这些是我的索引.rst 文件:

Welcome to Mycode's documentation!
===================================
Contents:
.. automodule:: mycode
   :members:
___________________________________
**Sub-Modules:  **
.. toctree::
   :maxdepth: 2
   mycode.TerminalColors

Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

这是我 conf.py:

sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../docs'))
sys.path.insert(0, os.path.abspath('../scripts'))
sys.path.insert(0, os.path.abspath('../source'))
print(sys.path)
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.viewcode',
    'sphinxcontrib.napoleon'
]
# Napoleon settings
napoleon_google_docstring = True
napoleon_numpy_docstring = True
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = True
napoleon_use_admonition_for_examples = False
napoleon_use_admonition_for_notes = False
napoleon_use_admonition_for_references = False
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_rtype = True
autodoc_member_order = 'groupwise'
templates_path = ['.templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'Mycode'
copyright = u'2016, Me'
version = '1.0'
release = '1.0'
exclude_patterns = []
pygments_style = 'sphinx'
html_theme = 'default'
html_static_path = ['.static']
htmlhelp_basename = 'Mycodedoc'
latex_elements = {}
latex_documents = [
  ('index', 'Mycode.tex', u'Mycode Documentation',
   u'me', 'manual'),
]
man_pages = [
    ('index', 'mycode', u'mycode Documentation',
     [u'me'], 1)
]
texinfo_documents = [
  ('index', 'Mycode', u'Mycode Documentation',
   u'me', 'Mycode', 'One line description of project.',
   'Miscellaneous'),
]

最后,这是我的项目结构:

-mycode
   -scripts
      -mycode.py
   -docs(output folder)
      -index.html
      -...
   -build
   -source
       -conf.py
       -index.rst

任何帮助将不胜感激!谢谢

已解决。如果在导入时执行,模块中的任何类似等待的函数都会导致 Sphinx 在导入时挂起。我正在使用 ROS,rospy.wait_for_service导致了问题。

最新更新