We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3ec5704 + 9822628 commit a79bab0Copy full SHA for a79bab0
lib/matplotlib/backends/backend_pgf.py
@@ -309,9 +309,13 @@ def __init__(self):
309
self.texcommand = get_texcommand()
310
self.latex_header = LatexManager._build_latex_header()
311
latex_end = "\n\\makeatletter\n\\@@end\n"
312
- latex = subprocess.Popen([self.texcommand, "-halt-on-error"],
313
- stdin=subprocess.PIPE, stdout=subprocess.PIPE,
314
- cwd=self.tmpdir)
+ try:
+ latex = subprocess.Popen([self.texcommand, "-halt-on-error"],
+ stdin=subprocess.PIPE,
315
+ stdout=subprocess.PIPE,
316
+ cwd=self.tmpdir)
317
+ except OSError:
318
+ raise RuntimeError("Error starting process '%s'" % self.texcommand)
319
test_input = self.latex_header + latex_end
320
stdout, stderr = latex.communicate(test_input.encode("utf-8"))
321
if latex.returncode != 0:
0 commit comments