Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Building docs has issues with ipython version 7.0.0. Created a condition in the docs-requirements.txt to not allow installing the specific version. #12583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

Anirudhsekar96
Copy link

I have included a condition to not install ipython version 7.0.0 in the docs-requirement.txt file. This is because Ipython version 7.0.0 wasn't allowing the make html command to build the doc files.

@QuLogic
Copy link
Member

QuLogic commented Oct 21, 2018

What issues exactly?

@tacaswell tacaswell added this to the v3.0.0-doc milestone Oct 21, 2018
@Anirudhsekar96
Copy link
Author

Anirudhsekar96 commented Oct 21, 2018

Exception occurred:
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/IPython/sphinxext/ipython_directive.py", line 582, in process_input
    raise RuntimeError('Non Expected warning in `{}` line {}'.format(filename, lineno))
RuntimeError: Non Expected warning in `/media/anirudh/Data/Code/matplotlib/doc/users/prev_whats_new/whats_new_1.5.rst` line 51
The full traceback has been saved in /tmp/sphinx-err-7sd1qvzv.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.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Makefile:20: recipe for target 'html' failed
make: *** [html] Error 2

This was the error that I encountered while issuing the command "make html"

@QuLogic
Copy link
Member

QuLogic commented Oct 21, 2018

That's only the end of the message; please post the entire thing.

@Anirudhsekar96
Copy link
Author

Anirudhsekar96 commented Oct 21, 2018

Traceback (most recent call last):
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/sphinx/cmd/build.py", line 304, in build_main
    app.build(args.force_all, filenames)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/sphinx/application.py", line 341, in build
    self.builder.build_update()
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 347, in build_update
    len(to_build))
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 360, in build
    updated_docnames = set(self.read())
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 468, in read
    self._read_serial(docnames)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 490, in _read_serial
    self.read_doc(docname)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 534, in read_doc
    doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/sphinx/io.py", line 318, in read_doc
    pub.publish()
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/core.py", line 217, in publish
    self.settings)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/readers/__init__.py", line 72, in read
    self.parse()
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/readers/__init__.py", line 78, in parse
    self.parser.parse(self.input, document)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/sphinx/parsers.py", line 88, in parse
    self.statemachine.run(inputstring, document, inliner=self.inliner)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 171, in run
    input_source=document['source'])
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 2753, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 327, in section
    self.new_subsection(title, lineno, messages)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
    node=section_node, match_titles=True)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
    node=node, match_titles=match_titles)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 196, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 2753, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 327, in section
    self.new_subsection(title, lineno, messages)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
    node=section_node, match_titles=True)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
    node=node, match_titles=match_titles)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 196, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 2326, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 2338, in explicit_construct
    return method(self, expmatch)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 2081, in directive
    directive_class, match, type_name, option_presets)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 2130, in run_directive
    result = directive_instance.run()
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/IPython/sphinxext/ipython_directive.py", line 1004, in run
    rows, figure = self.shell.process_block(block)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/IPython/sphinxext/ipython_directive.py", line 711, in process_block
    self.process_input(data, input_prompt, lineno)
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/IPython/sphinxext/ipython_directive.py", line 582, in process_input
    raise RuntimeError('Non Expected warning in `{}` line {}'.format(filename, lineno))
RuntimeError: Non Expected warning in `/media/anirudh/Data/Code/matplotlib/doc/users/prev_whats_new/whats_new_1.5.rst` line 51

This was the log file that was created

@jklymak
Copy link
Member

jklymak commented Oct 21, 2018

This has been fixed on master already I think

@tacaswell
Copy link
Member

@jklymak on our master or ipython master?

@QuLogic
Copy link
Member

QuLogic commented Oct 21, 2018

@Anirudhsekar96 No, we need to see the warning that it's talking about before the traceback, not the log of the traceback.

@jklymak
Copy link
Member

jklymak commented Oct 21, 2018

You get that error running our docs on older prs that haven’t been rebased.

@Anirudhsekar96
Copy link
Author

@Anirudhsekar96 No, we need to see the warning that it's talking about before the traceback, not the log of the traceback.


>>>-------------------------------------------------------------------------
Warning in /media/anirudh/Data/Code/matplotlib/doc/users/prev_whats_new/whats_new_1.5.rst at block ending on line 51
Specify :okwarning: as an option in the ipython:: block to suppress this message
----------------------------------------------------------------------------
/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/matplotlib/figure.py:448: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  % get_backend())
<<<-------------------------------------------------------------------------

Exception occurred:
  File "/home/anirudh/anaconda/envs/matplot/lib/python3.7/site-packages/IPython/sphinxext/ipython_directive.py", line 582, in process_input
    raise RuntimeError('Non Expected warning in `{}` line {}'.format(filename, lineno))
RuntimeError: Non Expected warning in `/media/anirudh/Data/Code/matplotlib/doc/users/prev_whats_new/whats_new_1.5.rst` line 51
The full traceback has been saved in /tmp/sphinx-err-7sd1qvzv.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.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Makefile:20: recipe for target 'html' failed
make: *** [html] Error 2

Is this the one?

@QuLogic
Copy link
Member

QuLogic commented Oct 21, 2018

Yes, that's the one; it should have been fixed by #12322. Did you try with the latest master?

@Anirudhsekar96
Copy link
Author

Yes, I forked it today from the main master branch.

@thoo
Copy link
Contributor

thoo commented Oct 21, 2018

@QuLogic I just cloned and checked it a few minutes ago on my mac and I got the same error. I have to downgrade to ipython==6.5.0 to get it fix.

@anntzer anntzer mentioned this pull request Oct 21, 2018
6 tasks
@tacaswell
Copy link
Member

The issue shows up when trying to build the docs from the master branch against a 3.0.0 installation.

I don't see how the changes in #12322 would affect this...

@Carreau
Copy link
Contributor

Carreau commented Oct 22, 2018

That's a change in IPython, you will be able to opt-out with IPython 7.1 with ipython_warning_is_error = False. We had too many case of docs silently failing on RTD, so this was turned on. Sorry for the regression.

@Anirudhsekar96
Copy link
Author

If the issue has been rectified in IPython 7.1, then wouldn't it be better if we add a condition which skips just the problematic IPython 7.0.0 and 7.0.1 (the condition which I have added in my pull request)?

@Carreau
Copy link
Contributor

Carreau commented Oct 22, 2018

If the issue has been rectified in IPython 7.1, then wouldn't it be better if we add a condition which skips just the problematic IPython 7.0.0 and 7.0.1 (the condition which I have added in my pull request)?

You can, but the IPython directive will still be stricter in 7.1 than in 6.x, so you either need to set ipython_warn_is_error = False and/or fix the problematic code blocks.

@tacaswell
Copy link
Member

If this was an intentional change to IPython, lets try and fix the offending codeblock

@anntzer
Copy link
Contributor

anntzer commented Nov 1, 2018

Closed by #12684, AFAICT.

@anntzer anntzer closed this Nov 1, 2018
@QuLogic QuLogic removed this from the v3.0.0-doc milestone Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants