error rendering to pdf when including Python error message with containing \
as e.g. np.testing.assert_equal
#11695
Milestone
\
as e.g. np.testing.assert_equal
#11695
Bug description
Important
In short the problem is that some Python error messages contain
\
(backslash) that needs to be translated to\textbackslash{}
for LaTeX outputNote
Follow up to #10891.
When rendering the following code chunk with
#| error: true
and the Python code that uses thenumpy.testing.assert_equal
.The problem is with the error message itself
that contains two
\n
in the line879 err_msg += '\n' + '\n'.join(remarks)
.This gets translated to
and here we have a problem with the
\n
that can be fixed by replacing it with\textbackslash{}n
.Steps to reproduce
Expected behavior
I run:
I expected a pdf to be produced, containing the Python error message and traceback.
Actual behavior
Your environment
Quarto check output
quarto check Quarto 1.7.3 [✓] Checking environment information... Quarto cache location: ~/.cache/quarto [✓] Checking versions of quarto binary dependencies... Pandoc version 3.4.0: OK Dart Sass version 1.70.0: OK Deno version 1.46.3: OK Typst version 0.11.0: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.7.3 Path: /tmp/quartodebug/.venv/lib/python3.12/site-packages/quarto_cli/quarto-1.7.3/bin [✓] Checking tools....................OK TinyTeX: (not installed) Chromium: (not installed) [✓] Checking LaTeX....................OK Using: Installation From Path Path: /usr/bin Version: 2023 [✓] Checking basic markdown render....OK [✓] Checking Python 3 installation....OK Version: 3.12.3 Path: /tmp/quartodebug/.venv/bin/python3 Jupyter: 5.7.2 Kernels: python3 [✓] Checking Jupyter engine render....OK [✓] Checking R installation...........(None) Unable to locate an installed version of R. Install R from https://cloud.r-project.org/
The text was updated successfully, but these errors were encountered: