Skip to content

BUG: Fix JSON typo that breaks javascript in the docs #61572

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

Merged

Conversation

datapythonista
Copy link
Member

Closes #61571

As opposed to Python, JSON doesn't accept commas after the last element of a dict, and it's strict about it. We added this as a typo (I think I did the same during a release, I'll create an issue to validate this JSON in the CI) when updating the JSON that provides the versions for the documentation drop down. This seems to be breaking all the javascript in our docs.

@mroeschke I would merge this before waiting for the CI, but up to you.

@mroeschke
Copy link
Member

Is this failure related? https://github.com/pandas-dev/pandas/actions/runs/15474985199/job/43567905639?pr=61572

Writing evaluated template result to /home/runner/work/pandas/pandas/doc/build/html/_static/nbsphinx-code-cells.css

Extension error (pydata_sphinx_theme):
Handler <function update_config at 0x7f4fee50fbe0> for event 'builder-inited' threw an exception (exception: Expecting property name enclosed in double quotes: line 17 column 5 (char 392))

@datapythonista
Copy link
Member Author

I'm pretty sure it's not, but no idea where this exception is coming from, I'm having a look now and see if I can understand what's going on. I'll rerun the job

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM nonetheless. Feel free to merge when comfortable

@mroeschke mroeschke added this to the 3.0 milestone Jun 5, 2025
@datapythonista
Copy link
Member Author

Ok, I think it's kind of related, but I think this is failing because it's fetching the versions.json published online, which has the typo. I checked this is also broken in main (locally), so I'm going to merge, and hopefully we don't see this CI error anymore.

@datapythonista datapythonista merged commit 05f032c into pandas-dev:main Jun 5, 2025
11 of 13 checks passed
@datapythonista
Copy link
Member Author

The CI after merging also failed, since building the website fetches the file in production (kind of nonsense, but that's how the sphinx theme works), so we were in a loop where we can't fix the website because production is broken, and we can't update production because the website is broken. I updated the file in the server directly, and now everything should be fine. The dropdown works for me already, but the file with the typo may be cached for others I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Version dropdown not working
2 participants