Skip to content
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

Doc build failing with IPython 7.0 #22990

Closed
TomAugspurger opened this issue Oct 4, 2018 · 2 comments · Fixed by #23655
Closed

Doc build failing with IPython 7.0 #22990

TomAugspurger opened this issue Oct 4, 2018 · 2 comments · Fixed by #23655

Comments

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Oct 4, 2018

Looks like a regression upstream in IPython:
ipython/ipython#11362

We've temporarily pinned the doc build to 6.5. Will need to remove that pin when a fixed IPython is released.

Running Sphinx v1.8.1
/Users/taugspurger/Envs/pandas-dev/lib/python3.7/site-packages/sphinx/application.py:402: RemovedInSphinx20Warning: app.info() is now deprecated. Use sphinx.util.logging instead.
  RemovedInSphinx20Warning)
Initializing Spelling Checker
loading pickled environment... done
[autosummary] generating autosummary for: 10min.rst, advanced.rst, api.rst, basics.rst, categorical.rst, comparison_with_r.rst, comparison_with_sas.rst, comparison_with_sql.rst, comparison_with_stata.rst, computation.rst, ..., r_interface.rst, release.rst, reshaping.rst, sparse.rst, text.rst, timedeltas.rst, timeseries.rst, tutorials.rst, visualization.rst, whatsnew.rst
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 2 source files that are out of date
updating environment: 2 added, 0 changed, 0 removed
reading sources... [ 50%] cookbook

>>>-------------------------------------------------------------------------
Exception in /Users/taugspurger/sandbox/pandas/doc/source/cookbook.rst at block ending on line 485
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-88-f383d2261d3f> in <module>
----> 1 avg_weight += sum(x[x['size'] == 'M'].weight * 1.25)

NameError: name 'avg_weight' is not defined
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-89-f72d4d450698> in <module>
----> 1 avg_weight += sum(x[x['size'] == 'L'].weight)

NameError: name 'avg_weight' is not defined
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-90-ec76bd1aa2cb> in <module>
----> 1 avg_weight /= len(x)

NameError: name 'avg_weight' is not defined
  File "<ipython-input-91-204b3859f54f>", line 1
    return pd.Series(['L',avg_weight,True], index=['size', 'weight', 'adult'])
                                                                              ^
SyntaxError: 'return' outside function

<<<-------------------------------------------------------------------------


Exception occurred:
  File "/Users/taugspurger/Envs/pandas-dev/lib/python3.7/site-packages/IPython/sphinxext/ipython_directive.py", line 567, in process_input
    raise RuntimeError('Non Expected exception in `{}` line {}'.format(filename, lineno))
RuntimeError: Non Expected exception in `/Users/taugspurger/sandbox/pandas/doc/source/cookbook.rst` line 485
The full traceback has been saved in /var/folders/hz/f43khqfn7b1b1g8z_z6y3bsw0000gp/T/sphinx-err-kh0o4bnl.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!
@TomAugspurger TomAugspurger added this to the 0.24.0 milestone Oct 4, 2018
@TomAugspurger
Copy link
Contributor Author

ipython/ipython#11362

@TomAugspurger TomAugspurger changed the title Cookbook doc build failing with IPython 7.x Doc build failing with IPython 7.0 Oct 4, 2018
@TomAugspurger
Copy link
Contributor Author

IPython 7.1.1 is out, with this fixed. To close this issue we need two things

  1. Update our doc/source/conf.py to include ipython_warning_is_error = False
  2. remove the IPython version pin in ci/deps/travis-36-doc.yaml

benoxoft added a commit to benoxoft/pandas that referenced this issue Nov 12, 2018
thoo added a commit to thoo/pandas that referenced this issue Nov 13, 2018
…fixed

* upstream/master:
  CI: Allow to compile docs with ipython 7.11 pandas-dev#22990 (pandas-dev#23655)
  DOC: Fix name of the See Also section titles in docstrings (pandas-dev#23653)
  DOC: clean-up recent doc errors/warnings (pandas-dev#23636)
thoo added a commit to thoo/pandas that referenced this issue Nov 15, 2018
* upstream/master: (25 commits)
  DOC: Delete trailing blank lines in docstrings. (pandas-dev#23651)
  DOC: Change release and whatsnew (pandas-dev#21599)
  DOC: Fix format of the See Also descriptions (pandas-dev#23654)
  DOC: update pandas.core.groupby.DataFrameGroupBy.resample docstring. (pandas-dev#20374)
  ENH: Allow export of mixed columns to Stata strl (pandas-dev#23692)
  CLN: Remove unnecessary code (pandas-dev#23696)
  Pin flake8-rst version (pandas-dev#23699)
  Implement _most_ of the EA interface for DTA/TDA (pandas-dev#23643)
  CI: raise clone depth limit on CI
  BUG: Fix Series/DataFrame.rank(pct=True) with more than 2**24 rows (pandas-dev#23688)
  REF: Move Excel names parameter handling to CSV (pandas-dev#23690)
  DOC: Accessing files from a S3 bucket. (pandas-dev#23639)
  Fix errorbar visualization (pandas-dev#23674)
  DOC: Surface / doc mangle_dupe_cols in read_excel (pandas-dev#23678)
  DOC: Update is_sparse docstring (pandas-dev#19983)
  BUG: Fix read_excel w/parse_cols & empty dataset (pandas-dev#23661)
  Add to_flat_index method to MultiIndex (pandas-dev#22866)
  CLN: Move to_excel to generic.py (pandas-dev#23656)
  TST: IntervalTree.get_loc_interval should return platform int (pandas-dev#23660)
  CI: Allow to compile docs with ipython 7.11 pandas-dev#22990 (pandas-dev#23655)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant