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

BUG: Sphinx parallel build error - rstjinja handler threw exception for event 'source-read' #55116

Closed
3 tasks done
tpaxman opened this issue Sep 13, 2023 · 4 comments
Closed
3 tasks done

Comments

@tpaxman
Copy link
Contributor

tpaxman commented Sep 13, 2023

Pandas version checks

  • 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 main branch of pandas.

Reproducible Example

cd doc/
python make.py html

Issue Description

I am getting the following error when attempting to build the docs with python make.py html:

[1/1] Generating write_version_file with a custom command
[autosummary] generating autosummary for: development/community.rst, development/contributing.rst, development/contributing_codebase.rst, development/contributing_docstring.rst, development/contributing_documentation.rst, development/contributing_environment.rst, development/contributing_gitpod.rst, development/copy_on_write.rst, development/debugging_extensions.rst, development/developer.rst, ..., whatsnew/v1.5.1.rst, whatsnew/v1.5.2.rst, whatsnew/v1.5.3.rst, whatsnew/v2.0.0.rst, whatsnew/v2.0.1.rst, whatsnew/v2.0.2.rst, whatsnew/v2.0.3.rst, whatsnew/v2.1.0.rst, whatsnew/v2.1.1.rst, whatsnew/v2.2.0.rst
[autosummary] generating autosummary for: /home/tpaxman/code/pandas-tpaxman/doc/source/reference/api/pandas.Series.dt.normalize.rst, /home/tpaxman/code/pandas-tpaxman/doc/source/reference/api/pandas.Series.dt.normalize.rst
loading intersphinx inventory from https://dateutil.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://matplotlib.org/stable/objects.inv...
loading intersphinx inventory from https://numpy.org/doc/stable/objects.inv...
loading intersphinx inventory from https://pandas-gbq.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://pylib.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://docs.scipy.org/doc/scipy/objects.inv...
loading intersphinx inventory from https://arrow.apache.org/docs/objects.inv...
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 2292 source files that are out of date
updating environment: [new config] 2292 added, 0 changed, 0 removed
[1/1] Generating write_version_file with a custom command/v0.19.0

Sphinx parallel build error:
sphinx.errors.ExtensionError: Handler <function rstjinja at 0x7f41ff41e4d0> for event 'source-read' threw an exception (exception: unexpected char '\\' at 797920)
(pandas-dev) ~/code/pandas-tpaxman/doc (main)

I have had a similar issue before #53788 but this is slightly different. I updated mamba, updated the pandas-dev environment, and built pandas before running this so I don't know what would be out of date. I'm on WSL 2 FYI.

Expected Behavior

Expected the docs to build in html/

Installed Versions

>>> pd.show_versions() /home/tpaxman/mambaforge/envs/pandas-dev/lib/python3.10/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.")

INSTALLED VERSIONS

commit : 7e235d0
python : 3.10.12.final.0
python-bits : 64
OS : Linux
OS-release : 5.15.90.1-microsoft-standard-WSL2
Version : #1 SMP Fri Jan 27 02:56:13 UTC 2023
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8

pandas : 2.1.0.dev0+1128.g7e235d031b
numpy : 1.24.4
pytz : 2023.3.post1
dateutil : 2.8.2
setuptools : 67.7.2
pip : 23.2.1
Cython : 0.29.33
pytest : 7.4.2
hypothesis : 6.84.3
sphinx : 6.2.1
blosc : None
feather : None
xlsxwriter : 3.1.3
lxml.etree : 4.9.3
html5lib : 1.1
pymysql : 1.4.6
psycopg2 : 2.9.7
jinja2 : 3.1.2
IPython : 8.15.0
pandas_datareader : None
bs4 : 4.12.2
bottleneck : 1.3.7
dataframe-api-compat: None
fastparquet : 2023.8.0
fsspec : 2023.9.0
gcsfs : 2023.9.0
matplotlib : 3.7.2
numba : 0.57.1
numexpr : 2.8.4
odfpy : None
openpyxl : 3.1.2
pandas_gbq : None
pyarrow : 13.0.0
pyreadstat : 1.2.3
python-calamine : None
pyxlsb : 1.0.10
s3fs : 2023.9.0
scipy : 1.11.2
sqlalchemy : 2.0.20
tables : 3.8.0
tabulate : 0.9.0
xarray : 2023.8.0
xlrd : 2.0.1
zstandard : 0.19.0
tzdata : 2023.3
qtpy : None
pyqt5 : None

@tpaxman tpaxman added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 13, 2023
@DavidToneian
Copy link
Contributor

Hi,

I had experienced almost the same issue and reported it in #54212, but the problem vanished for me last time I tried. I haven't tested it since.

Can you check whether the issue is present for you when you checkout commit 01c3e8b?

Thanks!

@tpaxman
Copy link
Contributor Author

tpaxman commented Sep 17, 2023

Thanks for your comment @DavidToneian.

It seems like when I try to run things from that commit, I can't even get make.py to run:

(pandas-dev) ~/code/pandas-tpaxman/doc ((01c3e8b134...))
$ python make.py html
+ /home/tpaxman/mambaforge/envs/pandas-dev/bin/ninja
[1/1] Generating write_version_file with a custom command
Traceback (most recent call last):
  File "/home/tpaxman/code/pandas-tpaxman/doc/make.py", line 376, in <module>
    sys.exit(main())
  File "/home/tpaxman/code/pandas-tpaxman/doc/make.py", line 358, in main
    globals()["pandas"] = importlib.import_module("pandas")
  File "/home/tpaxman/mambaforge/envs/pandas-dev/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/tpaxman/code/pandas-tpaxman/pandas/__init__.py", line 46, in <module>
    from pandas.core.api import (
  File "/home/tpaxman/code/pandas-tpaxman/pandas/core/api.py", line 1, in <module>
    from pandas._libs import (
  File "/home/tpaxman/code/pandas-tpaxman/pandas/_libs/__init__.py", line 18, in <module>
    from pandas._libs.interval import Interval
  File "interval.pyx", line 1, in init pandas._libs.interval
  File "hashtable.pyx", line 1, in init pandas._libs.hashtable
  File "missing.pyx", line 1, in init pandas._libs.missing
  File "/home/tpaxman/code/pandas-tpaxman/pandas/_libs/tslibs/__init__.py", line 39, in <module>
    from pandas._libs.tslibs.conversion import localize_pydatetime
  File "conversion.pyx", line 1, in init pandas._libs.tslibs.conversion
  File "offsets.pyx", line 1, in init pandas._libs.tslibs.offsets
  File "timestamps.pyx", line 1, in init pandas._libs.tslibs.timestamps
  File "tzconversion.pyx", line 1, in init pandas._libs.tslibs.tzconversion
ImportError: pandas._libs.tslibs.dtypes does not export expected C variable c_DEPR_ABBREVS

Not sure what's going on here either.

@tpaxman
Copy link
Contributor Author

tpaxman commented Sep 20, 2023

Just an update: I checked this again on 28f274cb10 and the issue persists.

@rhshadrach
Copy link
Member

I think this has gone stale. If the issue persists, comment here and we can reopen.

@rhshadrach rhshadrach removed the Needs Triage Issue that has not been reviewed by a pandas team member label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants