pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
43.71k stars 17.92k forks source link

Self Build Doc Error #44302

Closed Tiaonmmn closed 1 year ago

Tiaonmmn commented 3 years ago

Reproducible Example

Self build pandas doc.

Issue Description

When I build pandas doc myself with guide ,I run python make.py html,several error occured on doc/source/user_guide/10min.rst

  1. This file use matplotlib to render images.And following error occured:
    WARNING: 
    >>>-------------------------------------------------------------------------
    Warning in /root/pandas/doc/source/user_guide/10min.rst at block ending on line 757
    Specify :okwarning: as an option in the ipython:: block to suppress this message
    ----------------------------------------------------------------------------
    <ipython-input-136-993bc8a3a2a6>:1: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
    plt.show();
    <<<-------------------------------------------------------------------------
  2. When I commented the plt.show() line,following error occured:
    
    Exception occurred:
    File "/root/pandas-doc/lib/python3.9/site-packages/docutils/writers/html5_polyglot/__init__.py", line 445, in section_title_tags
    if (ids and self.settings.section_self_link
    AttributeError: 'Values' object has no attribute 'section_self_link'
Following is the full traceback:

Sphinx version: 4.2.0

Python version: 3.9.5 (CPython)

Docutils version: 0.18 release

Jinja2 version: 3.0.2

Last messages:

waiting for workers...

looking for now-outdated files...

none found

pickling environment...

done

checking consistency...

done

preparing documents...

done

Loaded extensions:

sphinx.ext.mathjax (4.2.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/mathjax.py

sphinxcontrib.applehelp (1.0.2) from /root/pandas-doc/lib/python3.9/site-packages/sphinxcontrib/applehelp/init.py

sphinxcontrib.devhelp (1.0.2) from /root/pandas-doc/lib/python3.9/site-packages/sphinxcontrib/devhelp/init.py

sphinxcontrib.htmlhelp (2.0.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinxcontrib/htmlhelp/init.py

sphinxcontrib.serializinghtml (1.1.5) from /root/pandas-doc/lib/python3.9/site-packages/sphinxcontrib/serializinghtml/init.py

sphinxcontrib.qthelp (1.0.3) from /root/pandas-doc/lib/python3.9/site-packages/sphinxcontrib/qthelp/init.py

alabaster (0.7.12) from /root/pandas-doc/lib/python3.9/site-packages/alabaster/init.py

sphinx.ext.autodoc.preserve_defaults (1.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/autodoc/preserve_defaults.py

sphinx.ext.autodoc.type_comment (4.2.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/autodoc/type_comment.py

sphinx.ext.autodoc (4.2.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/autodoc/init.py

sphinx.ext.autosummary (4.2.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/autosummary/init.py

sphinx.ext.doctest (4.2.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/doctest.py

sphinx.ext.extlinks (4.2.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/extlinks.py

sphinx.ext.todo (4.2.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/todo.py

numpydoc (1.1.0) from /root/pandas-doc/lib/python3.9/site-packages/numpydoc/init.py

IPython.sphinxext.ipython_directive (unknown version) from /root/pandas-doc/lib/python3.9/site-packages/IPython/sphinxext/ipython_directive.py

IPython.sphinxext.ipython_console_highlighting (unknown version) from /root/pandas-doc/lib/python3.9/site-packages/IPython/sphinxext/ipython_console_highlighting.py

matplotlib.sphinxext.plot_directive (3.4.3) from /root/pandas-doc/lib/python3.9/site-packages/matplotlib/sphinxext/plot_directive.py

sphinx.ext.intersphinx (4.2.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/intersphinx.py

sphinx.ext.coverage (4.2.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/coverage.py

sphinx.ext.ifconfig (4.2.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/ifconfig.py

sphinx.ext.linkcode (4.2.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx/ext/linkcode.py

nbsphinx (0.8.7) from /root/pandas-doc/lib/python3.9/site-packages/nbsphinx.py

sphinx_panels (0.6.0) from /root/pandas-doc/lib/python3.9/site-packages/sphinx_panels/init.py

contributors (0.1) from /root/pandas/doc/sphinxext/contributors.py

pydata_sphinx_theme (unknown version) from /root/pandas-doc/lib/python3.9/site-packages/pydata_sphinx_theme/init.py

Traceback (most recent call last): File "/root/pandas-doc/lib/python3.9/site-packages/sphinx/cmd/build.py", line 280, in build_main app.build(args.force_all, filenames) File "/root/pandas-doc/lib/python3.9/site-packages/sphinx/application.py", line 343, in build self.builder.build_update() File "/root/pandas-doc/lib/python3.9/site-packages/sphinx/builders/init.py", line 293, in build_update self.build(to_build, File "/root/pandas-doc/lib/python3.9/site-packages/sphinx/builders/init.py", line 357, in build self.write(docnames, list(updated_docnames), method) File "/root/pandas-doc/lib/python3.9/site-packages/sphinx/builders/init.py", line 528, in write self._write_parallel(sorted(docnames), File "/root/pandas-doc/lib/python3.9/site-packages/sphinx/builders/init.py", line 555, in _write_parallel self.write_doc(firstname, doctree) File "/root/pandas-doc/lib/python3.9/site-packages/sphinx/builders/html/init.py", line 626, in write_doc self.docwriter.write(doctree, destination) File "/root/pandas-doc/lib/python3.9/site-packages/docutils/writers/init.py", line 78, in write self.translate() File "/root/pandas-doc/lib/python3.9/site-packages/sphinx/writers/html.py", line 70, in translate self.document.walkabout(visitor) File "/root/pandas-doc/lib/python3.9/site-packages/docutils/nodes.py", line 199, in walkabout if child.walkabout(visitor): File "/root/pandas-doc/lib/python3.9/site-packages/docutils/nodes.py", line 199, in walkabout if child.walkabout(visitor): File "/root/pandas-doc/lib/python3.9/site-packages/docutils/nodes.py", line 191, in walkabout visitor.dispatch_visit(self) File "/root/pandas-doc/lib/python3.9/site-packages/sphinx/util/docutils.py", line 477, in dispatch_visit method(node) File "/root/pandas-doc/lib/python3.9/site-packages/sphinx/writers/html5.py", line 375, in visit_title super().visit_title(node) File "/root/pandas-doc/lib/python3.9/site-packages/docutils/writers/_html_base.py", line 1661, in visit_title start_tag, close_tag = self.section_title_tags(node) File "/root/pandas-doc/lib/python3.9/site-packages/docutils/writers/html5_polyglot/init.py", line 445, in section_title_tags if (ids and self.settings.section_self_link AttributeError: 'Values' object has no attribute 'section_self_link'


### Expected Behavior

Build doc successfully.

### Installed Versions

<details>

import pandas as pd pd.show_versions() /root/pandas-doc/lib/python3.9/site-packages/fastparquet/dataframe.py:5: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.NumericIndex with the appropriate dtype instead. from pandas import (

INSTALLED VERSIONS

commit : 2e29e1172bb5d17c5d6f4d8bec1d3e6452091822 python : 3.9.5.final.0 python-bits : 64 OS : Linux OS-release : 5.4.0-77-generic Version : #86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.utf8 LOCALE : en_US.UTF-8

pandas : 1.4.0.dev0+1033.g2e29e1172b.dirty numpy : 1.20.3 pytz : 2021.3 dateutil : 2.8.2 pip : 20.0.2 setuptools : 58.4.0 Cython : 0.29.24 pytest : 6.2.5 hypothesis : 6.24.1 sphinx : 4.2.0 blosc : 1.10.6 feather : None xlsxwriter : 3.0.2 lxml.etree : 4.6.3 html5lib : 1.1 pymysql : None psycopg2 : None jinja2 : 3.0.2 IPython : 7.29.0 pandas_datareader: None bs4 : 4.10.0 bottleneck : 1.3.2 fsspec : 2021.10.1 fastparquet : 0.7.1 gcsfs : 2021.10.1 matplotlib : 3.4.3 numexpr : 2.7.3 odfpy : None openpyxl : 3.0.9 pandas_gbq : None pyarrow : 6.0.0 pyxlsb : None s3fs : 2021.10.1 scipy : 1.7.1 sqlalchemy : 1.4.26 tables : 3.6.1 tabulate : 0.8.9 xarray : 0.18.2 xlrd : 2.0.1 xlwt : 1.3.0 numba : 0.54.1



</details>
rhshadrach commented 1 year ago

Closing as a duplicate of #53777