Skip to content

[Bug] Setting HTML mermaid-format to png leads to ERROR: AssertionError: with no message #14457

@MurzNN

Description

@MurzNN

I have:

  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide

Bug description

I need to render HTML with Mermaid charts rendered as PNG images, not as SVG.
I tried to add an option to enable this mode like this:

format:
  html:
    mermaid-format: png

But after adding this, Quarto CLI starts to fail with no error message:

$ quarto preview /tmp/test.qmd
ERROR: AssertionError:
$

Steps to reproduce

  1. Create a Quarto file like this:
---
format:
  html:
    mermaid-format: png
---
```{mermaid}
flowchart TD
  A --> B
```
  1. Run Quarto CLI:
$ quarto preview /tmp/test.qmd

Actual behavior

It will output an error with no details:

ERROR: AssertionError: 

Expected behavior

It should render the chart in PNG, or, at least, display a meaningful error on what is done wrong.

Your environment

  • IDE: VSCode
  • OS: Ubuntu Linux

Quarto check output

Details
Quarto 1.9.37
[✓] Checking environment information...
      Quarto cache location: /home/alexey_korepov/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.8.3: OK
      Dart Sass version 1.87.0: OK
      Deno version 2.4.5: OK
      Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.9.37
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      Chrome Headless Shell: 148.0.7778.56
      TinyTeX: (not installed)
      Chromium: (not installed)
      VeraPDF: (not installed)

[✓] Checking LaTeX....................OK
      Tex:  (not detected)

[✓] Checking Chrome Headless....................OK
      Using: Chrome Headless Shell installed by Quarto
      Path: /home/alexey_korepov/.local/share/quarto/chrome-headless-shell/chrome-headless-shell-linux64/chrome-headless-shell
      Version: 148.0.7778.56

[✓] Checking basic markdown render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

[✓] Checking Python 3 installation....OK
      Version: 3.13.5
      Path: /usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking Julia installation...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions