Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| )fromerr | ||
| exceptOSErroraserr: | ||
| raiseRuntimeError( | ||
| f"Error starting process{self.latex.args[0]!r}")fromerr |
There was a problem hiding this comment.
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?!?
There was a problem hiding this comment.
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.
…689-on-v3.8.xBackport PR#26689 on branch v3.8.x (Fix error generation for missing pgf.texsystem.)
Fix error generation for missing pgf.texsystem.(cherry picked from commit5f785e3)
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