NameError

The exception raised when code uses a name that has not been assigned, or is misspelt, or is not visible from here.

In more detail

The message, such as name 'widht' is not defined, points at the unknown name. Common causes are a typo, wrong capitals, using a variable before assigning it, or using a function's local variable outside it. Like other runtime errors it appears only when the line runs.

Related terms

Taught in

References

Certification courses