Shortcuts

This page was generated from doc/allow-errors-per-cell.ipynb. Interactive online version: Binder badge

Ignoring Errors on a Per-Cell Basis

Instead of ignoring errors for all notebooks or for some selected notebooks (see the previous notebook), you can be more fine-grained and just allow errors on certain code cells by tagging them with the raises-exception tag.

[1]:
'no problem'
[1]:
'no problem'

The following code cell has the raises-exception tag.

[2]:
problem
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-526ab3a89ffc> in <module>
----> 1 problem

NameError: name 'problem' is not defined

The following code cell is executed even though the previous cell raised an exception.

[3]:
'no problem'
[3]:
'no problem'

Note:

The behavior of the raises-exception tag doesn’t match its name. While it does allow exceptions, it does not check if an exception is actually raised!

This will hopefully be fixed at some point, see https://github.com/jupyter/nbconvert/issues/730.

Read the Docs v: pytorch-theme
Versions
latest
0.5.0
0.4.3
0.4.2
0.4.1
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.18
0.2.17
0.2.16
0.2.15
0.2.14
0.2.13
0.2.12
0.2.11
0.2.10
0.2.9
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
typlog-theme
traditional-theme
sphinxdoc-theme
sizzle-theme
scrolls-theme
rtd-theme
pyviz-theme
pytorch-theme
pyramid-theme
py3doc-enhanced-theme
press-theme
pangeo-theme
pandas-theme
nature-theme
material-theme
maisie-theme
jupyter-theme
julia-theme
haiku-theme
guzzle-theme
cloud-theme
classic-theme
bootstrap-theme
bizstyle-theme
better-theme
basicstrap-theme
astropy-theme
alabaster-theme
alabaster-jupyterhub-theme
agogo-theme
0.1.0
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.

Docs

Lorem ipsum dolor sit amet, consectetur

View Docs

Tutorials

Lorem ipsum dolor sit amet, consectetur

View Tutorials

Resources

Lorem ipsum dolor sit amet, consectetur

View Resources