quarto-dev / quarto-dev/quarto-cli

Inline execution: error messages are not great

Open
#8,723 0 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Feb 13, 2024.

engines-jupyter enhancement lint
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Consider:

---
engine: jupyter
---

```{python}
x = {}
```

This is going to cause an error: `{python} x["hello"]`

The error message here is pretty poor:

Starting python3 kernel...Done

Executing 'inline-error.ipynb'
  Cell 1/1: ''...Done
ERROR:

KeyError: 'hello'
ERROR: Error
    at renderFiles (file:///Users/cscheid/repos/github/quarto-dev/quarto-cli/src/command/render/render-files.ts:354:23)
    at eventLoopTick (ext:core/01_core.js:183:11)
    at async render (file:///Users/cscheid/repos/github/quarto-dev/quarto-cli/src/command/render/render-shared.ts:99:18)
    at async Command.fn (file:///Users/cscheid/repos/github/quarto-dev/quarto-cli/src/command/render/cmd.ts:248:26)
    at async Command.execute (file:///Users/cscheid/repos/github/quarto-dev/quarto-cli/src/vendor/deno.land/x/cliffy@v0.25.4/command/command.ts:1790:7)
    at async quarto (file:///Users/cscheid/repos/github/quarto-dev/quarto-cli/src/quarto.ts:155:3)
    at async file:///Users/cscheid/repos/github/quarto-dev/quarto-cli/src/quarto.ts:186:5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.