Hello,

I'm trying to use the numpydoc extension to Sphinx, but have been unable to 
build documentation with the extension enabled:

make html
sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v1.0.7
loading pickled environment... failed: env version not current
building [html]: targets for 5 source files that are out of date
updating environment: 5 added, 0 changed, 0 removed
/usr/local/lib/python2.6/dist-packages/numpydoc-0.4-py2.6.egg/numpydoc/docscrape.py:117:
 
DeprecationWarning: functions overriding warnings.showwarning() must support 
the 'line' argument
  warn("Unknown section %s" % key)

Exception occurred:
  File "/usr/lib/python2.6/warnings.py", line 29, in _show_warning
    file.write(formatwarning(message, category, filename, lineno, line))
TypeError: formatwarning() takes exactly 4 arguments (5 given)
The full traceback has been saved in /tmp/sphinx-err-u0lmAf.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-dev/>,
or report them in the tracker at 
<http://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!
make: *** [html] Error 1


The full traceback is:

# Sphinx version: 1.0.7
# Python version: 2.6.5
# Docutils version: 0.6 release
# Jinja2 version: 2.3.1
Traceback (most recent call last):
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/cmdline.py",
 
line 188, in main
    app.build(force_all, filenames)
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/application.py",
 
line 207, in build
    self.builder.build_update()
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/builders/__init__.py",
 
line 198, in build_update
    'out of date' % len(to_build))
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/builders/__init__.py",
 
line 218, in build
    purple, length):
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/builders/__init__.py",
 
line 120, in status_iterator
    for item in iterable:
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/environment.py",
 
line 519, in update_generator
    self.read_doc(docname, app=app)
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/environment.py",
 
line 664, in read_doc
    pub.publish()
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/core.py",
 
line 203, in publish
    self.settings)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/readers/__init__.py",
 
line 69, in read
    self.parse()
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/readers/__init__.py",
 
line 75, in parse
    self.parser.parse(self.input, document)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/__init__.py",
 
line 157, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py",
 
line 170, in run
    input_source=document['source'])
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py",
 
line 233, in run
    context, state, transitions)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py",
 
line 421, in check_line
    return method(match, context, next_state)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py",
 
line 2678, in underline
    self.section(title, source, style, lineno - 1, messages)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py",
 
line 323, in section
    self.new_subsection(title, lineno, messages)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py",
 
line 391, in new_subsection
    node=section_node, match_titles=1)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py",
 
line 278, in nested_parse
    node=node, match_titles=match_titles)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py",
 
line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py",
 
line 233, in run
    context, state, transitions)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/statemachine.py",
 
line 421, in check_line
    return method(match, context, next_state)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py",
 
line 2258, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py",
 
line 2270, in explicit_construct
    return method(self, expmatch)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py",
 
line 2013, in directive
    directive_class, match, type_name, option_presets)
  File 
"/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg/docutils/parsers/rst/states.py",
 
line 2062, in run_directive
    result = directive_instance.run()
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/ext/autodoc.py",
 
line 1175, in run
    documenter.generate(more_content=self.content)
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/ext/autodoc.py",
 
line 713, in generate
    self.document_members(all_members)
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/ext/autodoc.py",
 
line 638, in document_members
    check_module=members_check_module and not isattr)
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/ext/autodoc.py",
 
line 710, in generate
    self.add_content(more_content)
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/ext/autodoc.py",
 
line 974, in add_content
    ModuleLevelDocumenter.add_content(self, more_content)
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/ext/autodoc.py",
 
line 478, in add_content
    for i, line in enumerate(self.process_doc(docstrings)):
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/ext/autodoc.py",
 
line 445, in process_doc
    self.options, docstringlines)
  File 
"/usr/local/lib/python2.6/dist-packages/Sphinx-1.0.7-py2.6.egg/sphinx/application.py",
 
line 317, in emit
    results.append(callback(self, *args))
  File 
"/usr/local/lib/python2.6/dist-packages/numpydoc-0.4-py2.6.egg/numpydoc/numpydoc.py",
 
line 41, in mangle_docstrings
    doc = get_doc_object(obj, what, u"\n".join(lines), config=cfg)
  File 
"/usr/local/lib/python2.6/dist-packages/numpydoc-0.4-py2.6.egg/numpydoc/docscrape_sphinx.py",
 
line 221, in get_doc_object
    config=config)
  File 
"/usr/local/lib/python2.6/dist-packages/numpydoc-0.4-py2.6.egg/numpydoc/docscrape_sphinx.py",
 
line 202, in __init__
    ClassDoc.__init__(self, obj, doc=doc, func_doc=None, config=config)
  File 
"/usr/local/lib/python2.6/dist-packages/numpydoc-0.4-py2.6.egg/numpydoc/docscrape.py",
 
line 478, in __init__
    NumpyDocString.__init__(self, doc)
  File 
"/usr/local/lib/python2.6/dist-packages/numpydoc-0.4-py2.6.egg/numpydoc/docscrape.py",
 
line 110, in __init__
    self._parse()
  File 
"/usr/local/lib/python2.6/dist-packages/numpydoc-0.4-py2.6.egg/numpydoc/docscrape.py",
 
line 295, in _parse
    self[section] = content
  File 
"/usr/local/lib/python2.6/dist-packages/numpydoc-0.4-py2.6.egg/numpydoc/docscrape.py",
 
line 117, in __setitem__
    warn("Unknown section %s" % key)
  File "/usr/lib/pymodules/python2.6/pyfits/NP_pyfits.py", line 76, in 
showwarning
    _showwarning(message, category, filename, lineno, file)
  File "/usr/lib/python2.6/warnings.py", line 29, in _show_warning
    file.write(formatwarning(message, category, filename, lineno, line))
TypeError: formatwarning() takes exactly 4 arguments (5 given)


I'm using the latest version of numpydoc from git along with Sphinx 1.0.7. 
The error seems to occur even if I attempt to build an empty .rst file.

Any ideas what could be going wrong?
Keith

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to