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

wrap weasyprint to catch exceptions #6324

Closed
rjsparks opened this issue Sep 15, 2023 · 0 comments · Fixed by #6728
Closed

wrap weasyprint to catch exceptions #6324

rjsparks opened this issue Sep 15, 2023 · 0 comments · Fixed by #6728
Assignees
Labels

Comments

@rjsparks
Copy link
Member

A recent network issue caused weasyprint to fail to fetch some font information from the static site.

At weasyprint/urls.py#L249 a URLFetching error was raised trying to retrieve https://static.ietf.org/fonts/noto-sans-mono/import.css (the fetch returned a 502 Bad Gateway).

The library is called in the pdfized() call at doc/views_doc.py#L977 -> doc/models.py#L641 call to wpHTML

@pselkirk pselkirk self-assigned this Nov 2, 2023
pselkirk added a commit to pselkirk/datatracker that referenced this issue Dec 3, 2023
rjsparks added a commit that referenced this issue Dec 27, 2023
* fix: Wrap weasyprint to catch exceptions (#6324)

* test: Restore socket function after test

* test: Use mock instead of monkeying with sockets

* refactor: Log the error

* fix: Don't catch non-Exception interruptions

---------

Co-authored-by: Robert Sparks <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants