Python sphinx Sphinx错误:未知指令类型“未知”;“自动模块”;或;“自动类”;
我需要使用Sphinx记录我的Python项目。但是我不能使用Python sphinx Sphinx错误:未知指令类型“未知”;“自动模块”;或;“自动类”;,python-sphinx,autodoc,Python Sphinx,Autodoc,我需要使用Sphinx记录我的Python项目。但是我不能使用autodoc 当我配置我的项目时,我选择了选项“extension autodoc”,但是现在如果我使用 .. autoclass:: Class 我得到一个错误: ERROR: Unknown directive type "autoclass" 我配置了PYTHONPATH,现在一切正常。但是我已经有这个问题了 我的索引文件是: .. ATOM documentation master file, created by
autodoc
当我配置我的项目时,我选择了选项“extension autodoc”,但是现在如果我使用
.. autoclass:: Class
我得到一个错误:
ERROR: Unknown directive type "autoclass"
我配置了PYTHONPATH
,现在一切正常。但是我已经有这个问题了
我的索引文件是:
.. ATOM documentation master file, created by
sphinx-quickstart on Thu Nov 22 15:24:42 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to ATOM's documentation!
================================
Contents:
.. toctree::
:maxdepth: 2
.. automodule:: atom
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
我需要有人告诉我如何解决这个问题
谢谢同样的事情发生在我身上!要修复它,请转到conf.py中的一行,该行显示如下内容:
extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode']
你的可能会看起来不一样。无论如何,请将'sphinx.ext.autodoc'
添加到列表中。e、 g
extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc']
如果是:
extensions = []
然后将其更改为:
extensions = ['sphinx.ext.autodoc']
来源:conf.py中的配置变量中是否包含“sphinx.ext.autodoc”?