TypeError

The exception raised when an operation or function gets a value of the wrong type, such as adding a number to a string.

In more detail

The message names the types involved, as in can only concatenate str (not "int") to str. The usual fix is to convert one value, for example with str() or int(). Calling something that is not a function also raises it.

Related terms

Taught in

References

Certification courses