Sphinx error: Unknown directive type "automodule" or "autoclass"
The same thing happened to me! To fix it, go to the line in conf.py that says something like this:
extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode']
Yours will probably look different. Anyway, add 'sphinx.ext.autodoc'
to the list. e.g.
extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc']
If it was:
extensions = []
then you'd change it to:
extensions = ['sphinx.ext.autodoc']
Sources: Sphinx documentation: ERROR: Unknown directive type "program-output"
![edgarzamora](https://i.stack.imgur.com/KRQuY.jpg?s=256&g=1)
edgarzamora
Programming and new technologies are one of my passions and that is why I love what I do when working. In the last years I have been working on distributed systems and Cloud computing in a research group at Rovira i Virgili University. Then, I moved to UK (Chester) starting a new adventure as a Software Engineer in The Realbuzz Group company. There I improved my skills as a backend developer focused on API design, scalability problems and driving a new project for Abbott World Marathon Majors. After that, I've moved to Manchester in search of new challenges. Here I started a new position as Senior Developer in the Planixs Ltd company. Planixs provides cloud-enabled solutions that power any Treasury in any industry to become Real-Time with instant insight, rapid analytics, intraday control and agile liquidity. Currently I'm working as Team-lead Developer in Planixs, working on new challenges, mentoring other developers and trying to keep the Realiti® - The Intraday Control suite product as the best in this sector. On my free time I like to learn new programming languages, improve my skills in distributed systems and cloud computing, and contribute in open-source projects and different communities like StackOverFlow.
Updated on July 08, 2022Comments
-
edgarzamora almost 2 years
I need to document my Python project using Sphinx. But I can't use
autodoc
.When I config my project I select the option "extension autodoc", but now if I use
.. autoclass:: Class
I get an error:
ERROR: Unknown directive type "autoclass"
I configure the
PYTHONPATH
, and now it's good. But I already have this problem.My index file is:
.. 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`
I need that someone to tell me how I can fix the problem.
Thank you