documentation build issue with sphinx >= 1.1 in stats tutorial (Trac #1671) #2196

Closed
scipy-gitbot opened this Issue Apr 25, 2013 · 7 comments

Projects

None yet

1 participant

@scipy-gitbot

Original ticket http://projects.scipy.org/scipy/ticket/1671 on 2012-06-07 by @dlax, assigned to @rgommers.

With sphinx >= 1.1 (tested with 1.1.2 and 1.1.3), the documentation fails to build with the following error:

reading sources... [100%] tutorial/stats                                                                           
Exception occurred:
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 237, in run
    context, state, transitions)
  File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 458, in check_line
    return method(match, context, next_state)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2283, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2295, in explicit_construct
    return method(self, expmatch)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2036, in directive
    directive_class, match, type_name, option_presets)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2087, in run_directive
    result = directive_instance.run()
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/__init__.py", line 382, in run
    self.state, self.state_machine)
  File "/usr/lib/pymodules/python2.7/matplotlib/sphinxext/plot_directive.py", line 210, in plot_directive
    return run(arguments, content, options, state_machine, state, lineno)
  File "/usr/lib/pymodules/python2.7/matplotlib/sphinxext/plot_directive.py", line 627, in run
    fd = open(source_file_name, 'r')
IOError: [Errno 2] No such file or directory: u'/home/denis/src/python/scipy/doc/source/examples/normdiscr_plot1.py'

This was already discussed in [https://github.com/scipy/scipy/pull/152 PRgh-679].

Here is a patch for this (that I have to apply each time I build the doc...).

@scipy-gitbot

@rgommers wrote on 2012-06-07

I'm okay with bumping up the required Sphinx version if that fixes it for everyone (and it's not buggy).

Need to check the number of warnings from a doc build and the total number of pages in the refguide; no better way to catch Sphinx bugs that I know of.

@scipy-gitbot

@rgommers wrote on 2012-08-19

I upgraded to Sphinx 1.1.3, but everything still works for me - both with make html in the doc dir and with paver pdf in the base dir. So this patch will likely break things for me.

@scipy-gitbot

@rgommers wrote on 2012-11-13

Finally figure this out before the next release. See http://thread.gmane.org/gmane.comp.python.scientific.devel/17038/focus=17040

@scipy-gitbot

Milestone changed to 0.12.0 by @rgommers on 2012-11-13

@scipy-gitbot

@pv wrote on 2012-11-15

I suspect it's because the path handling in the plot_directive bundled with matplotlib is not compatible with the one in numpydoc. This was overlooked when the work was merged back into matplotlib.

The solution is probably to never use the plot_directive from numpydoc, and require a recent enough matplotlib.

Related: matplotlib/matplotlib#385

@scipy-gitbot

@pv wrote on 2012-11-18

Resolved by a45291b6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment