Fix link-check crash from html module shadowing - #856
Open
LukasWallrich wants to merge 1 commit into
Open
Conversation
The DOI validation step iterates site pages with `for html in SITE_ROOT.rglob(...)`, which rebinds the imported `html` module to a Path, so `html.unescape(...)` raises AttributeError and the job fails. Rename the loop variable to `page_file`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
👍 All image files/references (if any) are in webp format, in line with our policy. |
Contributor
Author
|
✅ Staging Deployment Status This PR has been successfully deployed to staging as part of an aggregated deployment. Deployed at: 2026-08-19 15:51:40 UTC The staging site shows the combined state of all compatible open PRs. |
Contributor
✅ Spell Check PassedNo spelling issues found when checking 1 changed file(s)! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The DOI validation step failed with
AttributeError: 'PosixPath' object has no attribute 'unescape'(run 31986717339).The page loop used
htmlas its variable name, rebinding the importedhtmlmodule to aPathbeforehtml.unescape()is called. Renamed the loop variable topage_file.Verified locally by extracting the step's script and running it over a fake site: real DOIs (incl. a SICI DOI with parens, an HTML-escaped bioRxiv DOI with a version suffix) pass, a fabricated DOI is reported as broken.
🤖 Generated with Claude Code