Skip to article frontmatterSkip to article content

This category describes errors that occur when running code cells. This list is not exhaustive, but it details some of themost frequent errors that new Notebook users encounter.

NameError

By far the most common errors that new students encounter are NameErrors. An example screenshot is below: NameErrors occur when a code cell refers to a name that has not yet been defined. This usually happens when:

Solutions:

ValueError

Common when dealing with table data, ValueErrors arise when misspelled column labels are used. An example screenshot is below: Solution:

TypeError

When using a function, e.g for table manipulation, it is possible to use the incorrect kind of value. In the example below, the column relabeling function is misused, causing errors in two different ways.

In this error, the function was given too many values:

In this example, the function was given a boolean (in this case, the value True) rather than a string:

Solutions:

Cells never stop running

Sometimes, cells can get “stuck” running:

When this issue occurs, the square brackets to the left of the cell contain an asterisk for several minutes, the open circle next to kernel type at the top right will stay solid grey, and the expected output never appears. This may happen when:

Solution: