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: Doc build fails locally due to rstjinja issue with doc/source/user_guide/style.nbconvert.ipynb #54212

Closed
3 tasks done
DavidToneian opened this issue Jul 20, 2023 · 3 comments
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member

Comments

@DavidToneian
Copy link
Contributor

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

python doc/make.py html

Issue Description

I'm trying to build the docs locally on main. I run into the same issue as #53777; after fixing it like in #53788 (comment), I run into another issue:

sphinx.errors.ExtensionError: Handler <function rstjinja at 0x7fb0b050c700> for event 'source-read' threw an exception (exception: unexpected char '\\' at 798112)

This seems to be correspond to doc/source/user_guide/style.nbconvert.ipynb line 14385, which is part of the following output block:

"outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{% extends \"html_table.tpl\" %}\n",
      "{% block table %}\n",
      "<h1>{{ table_title|default(\"My Table\") }}</h1>\n",
      "{{ super() }}\n",
      "{% endblock table %}\n",
      "\n"
     ]
    }
],

Line 14385 is the one that reads "{% extends \"html_table.tpl\" %}\n",. I assume jinja tries to parse this as as a block, and chokes on the escape character.

What I am wondering is two things:

  1. Why does this not happen in the GitHub action that builds the docs? I tried to repliacte the environment locally as best as I could, but apparently there's something going on I don't understand.
  2. How to fix the rstjinja issue, in case the answer to question 1 does not lead to a satisfying answer?

Expected Behavior

Docs should compile without error.

Installed Versions

INSTALLED VERSIONS

commit : c3cd0cb
python : 3.10.12.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-153-generic
Version : #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8

pandas : 2.0.3-dev+85.gc3cd0cb80d.dirty
numpy : 1.24.4
pytz : 2023.3
dateutil : 2.8.2
setuptools : 68.0.0
pip : 23.2
Cython : 0.29.33
pytest : 7.4.0
hypothesis : 6.82.0
sphinx : 6.2.1
blosc : None
feather : None
xlsxwriter : 3.1.2
lxml.etree : 4.9.3
html5lib : 1.1
pymysql : 1.4.6
psycopg2 : 2.9.6
jinja2 : 3.1.2
IPython : 8.14.0
pandas_datareader: None
bs4 : 4.12.2
bottleneck : 1.3.7
brotli :
fastparquet : 2023.7.0
fsspec : 2023.6.0
gcsfs : 2023.6.0
matplotlib : 3.7.2
numba : 0.57.1
numexpr : 2.8.4
odfpy : None
openpyxl : 3.1.2
pandas_gbq : None
pyarrow : 12.0.1
pyreadstat : 1.2.2
pyxlsb : 1.0.10
s3fs : 2023.6.0
scipy : 1.11.1
snappy :
sqlalchemy : 2.0.19
tables : 3.8.0
tabulate : 0.9.0
xarray : 2023.7.0
xlrd : 2.0.1
zstandard : 0.19.0
tzdata : 2023.3
qtpy : None
pyqt5 : None

@DavidToneian DavidToneian added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 20, 2023
@DavidToneian DavidToneian changed the title BUG: BUG: Doc build fails locally due to rstjinja issue with doc/source/user_guide/style.nbconvert.ipynb Jul 21, 2023
@Razeeeeeeeeeee
Copy link

hi @DavidToneian,
I'm a first time open source contributor, Is this a good issue to work on, If so i would wanna try my hand at it. Kindly guide me

@DavidToneian
Copy link
Contributor Author

Hi @Razeeeeeeeeeee,

please feel free to investigate this issue. If you've got prior development experience, unrelated to pandas, it may well be worth a try; otherwise, I suggest you look for other tickets that are labeled good first issue.

@DavidToneian
Copy link
Contributor Author

I don't experience this issue anymore. Closing for now; please re-open in case you are affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

No branches or pull requests

2 participants