RuntimeError: No directive named 'function' found

Anonymous avatarAnonymous created an issue

I tried to run Sphinx to make the documentation for pylpsolve, and got the following error (the traceback is included below it):

mkdir -p .build/latex .build/doctrees
sphinx-build -b latex -d .build/doctrees   . .build/latex
Running Sphinx v1.2.1

Exception occurred:
  File "/Users/bbradley/src/pylpsolve/doc/sphinxext/numpydoc.py", line 136, in get_directive
    raise RuntimeError("No directive named '%s' found" % name)
RuntimeError: No directive named 'function' found
The full traceback has been saved in /var/folders/19/8g3g1vyd0yj1xqzxqp76h_d4551wdw/T/sphinx-err-TT0izq.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
Either send bugs to the mailing list at <http://groups.google.com/group/sphinx-users/>,
or report them in the tracker at <http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!

The traceback is as follows:

# Sphinx version: 1.2.1
# Python version: 2.7.2
# Docutils version: 0.11 release
# Jinja2 version: 2.7.2
# Loaded extensions:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/Sphinx-1.2.1-py2.7.egg/sphinx/cmdline.py", line 253, in main
    warningiserror, tags, verbosity, parallel)
  File "/Library/Python/2.7/site-packages/Sphinx-1.2.1-py2.7.egg/sphinx/application.py", line 119, in __init__
    self.setup_extension(extension)
  File "/Library/Python/2.7/site-packages/Sphinx-1.2.1-py2.7.egg/sphinx/application.py", line 292, in setup_extension
    mod.setup(self)
  File "/Users/bbradley/src/pylpsolve/doc/sphinxext/numpydoc.py", line 119, in setup
    app.add_directive('np-' + name, wrap_mangling_directive(name, objtype))
  File "/Users/bbradley/src/pylpsolve/doc/sphinxext/numpydoc.py", line 139, in wrap_mangling_directive
    base_directive = get_directive(base_directive_name)
  File "/Users/bbradley/src/pylpsolve/doc/sphinxext/numpydoc.py", line 136, in get_directive
    raise RuntimeError("No directive named '%s' found" % name)
RuntimeError: No directive named 'function' found

Comments (4)

  1. Bill B

    I seem to get an analogous failure in Sphinx-1.1.3 (listed below). I should mention that this is the first time I've ever used Sphinx, so I may be making some elementary error in using:

    # Sphinx version: 1.1.3
    # Python version: 2.7.2
    # Docutils version: 0.11 release
    # Jinja2 version: 2.7.2
    Traceback (most recent call last):
      File "/Library/Python/2.7/site-packages/sphinx/cmdline.py", line 188, in main
        warningiserror, tags)
      File "/Library/Python/2.7/site-packages/sphinx/application.py", line 114, in __init__
        self.setup_extension(extension)
      File "/Library/Python/2.7/site-packages/sphinx/application.py", line 256, in setup_extension
        mod.setup(self)
      File "/Users/bbradley/src/pylpsolve/doc/sphinxext/numpydoc.py", line 119, in setup
        app.add_directive('np-' + name, wrap_mangling_directive(name, objtype))
      File "/Users/bbradley/src/pylpsolve/doc/sphinxext/numpydoc.py", line 139, in wrap_mangling_directive
        base_directive = get_directive(base_directive_name)
      File "/Users/bbradley/src/pylpsolve/doc/sphinxext/numpydoc.py", line 136, in get_directive
        raise RuntimeError("No directive named '%s' found" % name)
    RuntimeError: No directive named 'function' found
    
  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.