Skip to content

Self Build Doc Error #44302

Closed
Closed
@Tiaonmmn

Description

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the master branch of pandas.

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();
<<<-------------------------------------------------------------------------
  1. 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

``` >>> 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 : 2e29e11
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>

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions