You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: news/changelog-1.7.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,6 +140,7 @@ All changes included in 1.7:
140
140
141
141
- ([#12114](https://github.com/quarto-dev/quarto-cli/issues/12114)): `JUPYTERCACHE` environment variable from [Jupyter cache CLI](https://jupyter-cache.readthedocs.io/en/latest/using/cli.html) is now respected by Quarto when `cache: true` is used. This environment variable allows to change the path of the cache directory.
142
142
- ([#12374](https://github.com/quarto-dev/quarto-cli/issues/12374)): Detect language properly in Jupyter notebooks that lack the `language` field in their `kernelspec`s.
143
+
- ([#12228](https://github.com/quarto-dev/quarto-cli/issues/12228)): `quarto render` will now fails if errors are detected at IPython display level. Setting `error: true` globally or at cell level will keep the error to show in output and not stop the rendering.
143
144
144
145
## Other Fixes and Improvements
145
146
@@ -160,6 +161,7 @@ All changes included in 1.7:
160
161
- ([#11803](https://github.com/quarto-dev/quarto-cli/pull/11803)): Added a new CLI command `quarto call`. First users of this interface are the new `quarto call engine julia ...` subcommands.
161
162
- ([#12338](https://github.com/quarto-dev/quarto-cli/issues/12338)): Add an additional workaround for the SCSS parser used in color variable extraction.
162
163
- ([#12369](https://github.com/quarto-dev/quarto-cli/pull/12369)): `quarto preview` correctly throws a YAML validation error when a `format` key does not conform.
164
+
- ([#12238](https://gijit.com/quarto-dev/quarto-cli/issues/12238)): Very long error (e.g. in Jupyter Notenook with backtrace) are now no more truncated in the console.
With default setting, this document should error at rendering because of an exception at IPython.display level.
13
+
14
+
By default `nbconvert` does not throw exception for error thrown by IPython display, on purpose as document output is still valid as there are other representation.
15
+
16
+
```{python}
17
+
# First cell - create an object with a buggy _repr_markdown_ method
18
+
class BuggyDisplay:
19
+
def __init__(self):
20
+
self.data = "This works fine"
21
+
22
+
def _repr_html_(self):
23
+
# HTML representation used for `format: html`
24
+
return "<b>HTML fallback:</b> " + self.data
25
+
26
+
def _repr_markdown_(self):
27
+
# This error happens during display, not execution
28
+
# even if the markdown reprensentation is not used
29
+
raise ValueError("Display phase error!")
30
+
31
+
def __repr__(self):
32
+
# This ensures the object has a string representation
33
+
return self.data
34
+
35
+
# Create the object
36
+
buggy = BuggyDisplay()
37
+
```
38
+
39
+
```{python}
40
+
buggy
41
+
```
42
+
43
+
```{python}
44
+
print("Execution continued despite display error")
matches: ['ValueError\: Display phase error for HTML']
10
+
noMatches: []
11
+
---
12
+
13
+
With `error: true` in cell, this document should not error at rendering and Exception at IPython.display level should be shown in output.
14
+
15
+
By default `nbconvert` does not throw exception for error thrown by IPython display, on purpose as document output is still valid as there are other representation.
16
+
17
+
```{python}
18
+
# First cell - create an object with a buggy _repr_html_ method
19
+
class BuggyDisplay:
20
+
def __init__(self):
21
+
self.data = "This works fine"
22
+
23
+
def _repr_html_(self):
24
+
# This error happens during display, not execution
25
+
raise ValueError("Display phase error for HTML!")
26
+
27
+
def _repr_markdown_(self):
28
+
# Markdown representation as fallback when HTML fails
29
+
return "**Markdown fallback:** " + self.data
30
+
31
+
def __repr__(self):
32
+
# This ensures the object has a string representation
33
+
return self.data
34
+
35
+
# Create the object
36
+
buggy = BuggyDisplay()
37
+
```
38
+
39
+
```{python}
40
+
#| error: true
41
+
buggy
42
+
```
43
+
44
+
```{python}
45
+
print("Execution continued despite display error")
With `error: true`, and `error: false` at cell level, this document should error at rendering.
15
+
16
+
By default `nbconvert` does not throw exception for error thrown by IPython display, on purpose as document output is still valid as there are other representation.
17
+
18
+
```{python}
19
+
class BuggyDisplay:
20
+
def __init__(self):
21
+
self.data = "This works fine"
22
+
23
+
def _repr_html_(self):
24
+
# HTML representation used for `format: html`
25
+
return "<b>HTML fallback:</b> " + self.data
26
+
27
+
def _repr_markdown_(self):
28
+
# This error happens during display, not execution
29
+
# even if the markdown reprensentation is not used
30
+
raise ValueError("Display phase error for Markdown!")
31
+
32
+
def __repr__(self):
33
+
# This ensures the object has a string representation
34
+
return self.data
35
+
36
+
# Create the object
37
+
buggy = BuggyDisplay()
38
+
```
39
+
40
+
```{python}
41
+
#| error: false
42
+
buggy
43
+
```
44
+
45
+
```{python}
46
+
print("Execution continued despite display error")
matches: ['ValueError\: Display phase error for Markdown']
12
+
---
13
+
14
+
With `error: true` this document should not error at rendering and Exception at IPython.display level should be shown in output.
15
+
16
+
By default `nbconvert` does not throw exception for error thrown by IPython display, on purpose as document output is still valid as there are other representation.
17
+
18
+
```{python}
19
+
# First cell - create an object with a buggy _repr_markdown_ method
20
+
class BuggyDisplay:
21
+
def __init__(self):
22
+
self.data = "This works fine"
23
+
24
+
def _repr_html_(self):
25
+
# HTML representation used for `format: html`
26
+
return "<b>HTML fallback:</b> " + self.data
27
+
28
+
def _repr_markdown_(self):
29
+
# This error happens during display, not execution
30
+
# even if the markdown reprensentation is not used
31
+
raise ValueError("Display phase error for Markdown!")
32
+
33
+
def __repr__(self):
34
+
# This ensures the object has a string representation
35
+
return self.data
36
+
37
+
# Create the object
38
+
buggy = BuggyDisplay()
39
+
```
40
+
41
+
```{python}
42
+
buggy
43
+
```
44
+
45
+
```{python}
46
+
print("Execution continued despite display error")
0 commit comments