quarto-dev / quarto-dev/quarto-cli
Computed Captions crash when rendering manuscript to HTML
Open
@cscheid is already working on this.
Since Oct 19, 2024.
bug
crossref
manuscript
regression
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Computed Captions don't work for HTML output of manuscript project.
Steps to reproduce
Minimal example based on documentation:
---
title: "Reproducible Computed Captions Document"
format: html
engine: jupyter
---
::: {#fig-box}
```{python}
x = [1, 2, 3, 4, 5, 10]
print(x)
```
This dataset has `{python} len(x)` observations.
:::
Reproduction repository: https://github.com/winniehell/quarto-playground/tree/1f3c6ecef794096655619ebd8238c3d98fc510fc
cd test-manuscript/
quarto render --to html
Expected behavior
Figure is rendered, similar to book:
Actual behavior
Rendering crashes:
⚠️ Import assertions are deprecated. Use `with` keyword, instead of 'assert' keyword.
const resourceModule = (await import(toFileUrl2(resourcePath("editor/tools/yaml/yaml-intelligence-resources.json")).href, {
at file:///nix/store/ps94d8icw9hbm9ky3jm3q2vwa672yfgz-quarto-1.5.57/bin/quarto.js:82360:119
Starting python3 kernel...Done
Executing 'index.quarto_ipynb'
Cell 1/1: ''...Done
Rendering qmd embeds [index.qmd]
Error running filter /nix/store/ps94d8icw9hbm9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:
...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:22378: attempt to index a nil value (field 'content')
stack traceback:
...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:1233: in local 'filter_fn'
...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:635: in function <...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:625>
(...tail calls...)
[C]: in ?
[C]: in method 'walk'
...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:557: in function <...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:546>
(...tail calls...)
...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:1334: in local 'callback'
...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:1352: in upvalue 'run_emulated_filter_chain'
...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:1388: in function <...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:1385>
stack traceback:
...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:557: in function <...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:546>
(...tail calls...)
...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:1334: in local 'callback'
...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:1352: in upvalue 'run_emulated_filter_chain'
...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:1388: in function <...9ky3jm3q2vwa672yfgz-quarto-1.5.57/share/filters/main.lua:1385>
Your environment
NixOS 24.05.20241012.a3f9ad6 (Uakari)
Quarto check output
Quarto 1.5.57
output of quarto check
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.77.6: OK
Deno version 1.46.3: OK
Typst version 0.11.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.5.57
Path: /nix/store/ps94d8icw9hbm9ky3jm3q2vwa672yfgz-quarto-1.5.57/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /run/current-system/sw/bin
Version: undefined
⚠️ Import assertions are deprecated. Use `with` keyword, instead of 'assert' keyword.
const resourceModule = (await import(toFileUrl2(resourcePath("editor/tools/yaml/yaml-intelligence-resources.json")).href, {
at file:///nix/store/ps94d8icw9hbm9ky3jm3q2vwa672yfgz-quarto-1.5.57/bin/quarto.js:82360:119
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.5
Path: /nix/store/wqy1crq4yl12hjlcmvc8c7fsgmliyi4y-python3-3.12.5-env/bin/python3.12
Jupyter: 5.7.2
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.4.1
Path: /nix/store/z70v7siag32vkpwapfzmj84nw6y43gh9-R-4.4.1/lib/R
LibPaths:
- /nix/store/daik4k1c0wn51l60crca0bg5rwwb9ic3-r-boot-1.3-30/library
- /nix/store/lwvbgifsdz5lp04763cy7c5xi7ak4zf3-r-class-7.3-22/library
- /nix/store/ywxgbh558frpsgdfrv3d84rqb4zz12n5-r-MASS-7.3-61/library
- /nix/store/5gh44f15yfx1zglp5405v3xr9lzmns7r-r-cluster-2.1.6/library
- /nix/store/a1hrni8rqgxwfck0r597flf1fg3jj486-r-codetools-0.2-20/library
- /nix/store/w16lsd6irk7z007f5kz5y10wa7h64iv4-r-foreign-0.8-87/library
- /nix/store/2icpxrlzfgiaq8xnnrs9jb9y4nyfnrjh-r-KernSmooth-2.23-24/library
- /nix/store/2ab6xwyjga7fcyjj2f8bqna8r9m3c7rs-r-lattice-0.22-6/library
- /nix/store/3xnygjx6918c3jy4j19pbadzrc1z9kvw-r-Matrix-1.7-0/library
- /nix/store/z928qmv92cc69962g3ywah8bya6aca38-r-mgcv-1.9-1/library
- /nix/store/0dzm06h1xbwa9vpdmzhmhyp5fw38lvgr-r-nlme-3.1-166/library
- /nix/store/8w40bnvgyz1v3bd9pxn1spy0s4631szm-r-nnet-7.3-19/library
- /nix/store/cdyvmkzhc4zbm3rc9l9shrbfyyrhknnd-r-rpart-4.1.23/library
- /nix/store/aqb14s5f7m2g1b8im2qk4aka2lfxgpp2-r-spatial-7.3-17/library
- /nix/store/plbrhygxk1l22rx09dz6k64fikrdylxm-r-survival-3.7-0/library
- /nix/store/zmj4vzdb7wv45hrnwlq8iylkxz30k4dc-r-rmarkdown-2.28/library
- /nix/store/msrlr9vdh4cbg0md58ip425i32sqiaxz-r-bslib-0.8.0/library
- /nix/store/ivj01b8xi7xsw4dcqk8c9yc5yi9k3d8h-r-base64enc-0.1-3/library
- /nix/store/wmi5wbcyb8dfy92dqxcmhsxbaijs035v-r-cachem-1.1.0/library
- /nix/store/svjm71fi93h67bhznkqr95s0k8mfkgaz-r-fastmap-1.2.0/library
- /nix/store/6ki030nl3r1zwicv1zx5ps5s67bl5hgz-r-rlang-1.1.4/library
- /nix/store/ymrvw8ikv46cwyx80nkkgkvm151k1plm-r-htmltools-0.5.8.1/library
- /nix/store/2c8blk9g5lm3f7pmcy1pm3xzwj42qjnk-r-digest-0.6.36/library
- /nix/store/gqsj71kl85bwnmqzxiyvhzc2622rhb5g-r-jquerylib-0.1.4/library
- /nix/store/l0a09sccsi1dkg63c29mkpyggvb08z79-r-jsonlite-1.8.8/library
- /nix/store/wkmhssmavkcjc1dabvzil839gsjygg1j-r-lifecycle-1.0.4/library
- /nix/store/bwg6lqnpnpiv0fsq8ixm1a5phfmw8hn1-r-cli-3.6.3/library
- /nix/store/5056ych2577zb9gyfy4qpj7h5fdf9ad1-r-glue-1.7.0/library
- /nix/store/zm6jfjg2ssxh203mx4kh45xhrhfkdn8x-r-memoise-2.0.1/library
- /nix/store/q2rzc6dhg84mmny6xjz42v2ac9hbpywf-r-mime-0.12/library
- /nix/store/vzbfrr622313zh776r0aqf7y78fbrh28-r-sass-0.4.9/library
- /nix/store/fzmm775ppypmwxxygm2rdr9vrvxnmr02-r-R6-2.5.1/library
- /nix/store/pha01w01l40dsycyfnnvagzvv65zhd59-r-fs-1.6.4/library
- /nix/store/v4azfk4cdz5rk1l0255p40sfll3kqc90-r-rappdirs-0.3.3/library
- /nix/store/pi2whxkrj13cyqysc34w8xlrmlr26ckn-r-evaluate-0.24.0/library
- /nix/store/klfvbq1ga9dmzs0z28b0r7v2qvdxgf3w-r-fontawesome-0.5.2/library
- /nix/store/2jz6wc7wm1ajvi9baqsx0jv7c999h8cj-r-knitr-1.48/library
- /nix/store/d3d5w3sjlchd3hq8fm7bm33zh8xgmia2-r-highr-0.11/library
- /nix/store/jnfjcr31zmy9nnzm2li43hhp6rq8mjas-r-xfun-0.47/library
- /nix/store/69w2fsnbq4dkgzg2prkd69k4icmk8mqc-r-yaml-2.3.10/library
- /nix/store/1hgvyfnqaaj7vy7jnnv27a3y6gja081q-r-tinytex-0.52/library
- /nix/store/z70v7siag32vkpwapfzmj84nw6y43gh9-R-4.4.1/lib/R/library
knitr: 1.48
rmarkdown: 2.28
[✓] Checking Knitr engine render......OK
also reproduced on latest main (71945532e1fc1a5cf113117f6d5ff5bee3991797)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.