Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix error generation for missing pgf.texsystem.#26689

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ksunden merged 1 commit intomatplotlib:mainfromanntzer:pgferr
Sep 4, 2023

Conversation

@anntzer
Copy link
Contributor

If pgf.texsystem isn't installed, then self.latex will not be createdat all by _setup_latex_process, and we thus cannot access self.latex.args[0], but must instead read the rc value again. To make this clearer, move the error handling into _setup_latex_process, instead of having it outside.

No test because that'd require setting up a test env where pgf.texsystem is explicitlymissing (or go through lots of mocks), which seems not worth it.

This is (I think) the origin of the AttributeError in#26551.

PR summary

PR checklist

)fromerr
exceptOSErroraserr:
raiseRuntimeError(
f"Error starting process{self.latex.args[0]!r}")fromerr
Copy link
Member

@timhoffmtimhoffmSep 4, 2023
edited
Loading

Choose a reason for hiding this comment

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

Does this work? AFAICS, if the try block raises self.latex is not set in this method, i.e. it will be whatever it was before, possibly None?!?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Oops, there was the same bug there as with the FileNotFoundError case; fixed it too.

If pgf.texsystem isn't installed, then self.latex will not be created*at all* by _setup_latex_process, and we thus cannot accessself.latex.args[0], but must instead read the rc value again.  To makethis clearer, move the error handling into _setup_latex_process, insteadof having it outside.No test because that'd require setting up a test env where pgf.texsystemis explicitly *missing* (or go through lots of mocks), which seems notworth it.
@ksundenksunden added this to thev3.8.0 milestoneSep 4, 2023
@ksundenksunden merged commit5f785e3 intomatplotlib:mainSep 4, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestSep 4, 2023
@anntzeranntzer deleted the pgferr branchSeptember 4, 2023 18:32
oscargus added a commit that referenced this pull requestSep 5, 2023
…689-on-v3.8.xBackport PR#26689 on branch v3.8.x (Fix error generation for missing pgf.texsystem.)
@ksundenksunden mentioned this pull requestSep 15, 2023
5 tasks
QuLogic pushed a commit to QuLogic/matplotlib that referenced this pull requestFeb 14, 2024
Fix error generation for missing pgf.texsystem.(cherry picked from commit5f785e3)
@QuLogicQuLogic mentioned this pull requestFeb 14, 2024
1 task
@QuLogicQuLogic modified the milestones:v3.8.0,v3.7.5Feb 15, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ksundenksundenksunden approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

v3.7.5

Development

Successfully merging this pull request may close these issues.

4 participants

@anntzer@ksunden@timhoffm@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp