Python Error Codes
Python errors and exceptions explained in plain English. Find your error below for a clear explanation and how to fix it.
Error Codes
AttributeError
Python
Programming Language
An AttributeError means you tried to access a property or method that does not …
ConnectionError
Python
Programming Language
A ConnectionError means Python tried to connect to a network address — like a …
FileNotFoundError
Python
Programming Language
A FileNotFoundError means Python tried to open or access a file, but could not …
ImportError
Python
Programming Language
An ImportError means Python found the module you are trying to import, but …
IndentationError
Python
Programming Language
An IndentationError means the spacing at the start of a line is wrong.
Python …
IndexError
Python
Programming Language
An IndexError means you tried to access an item in a list (or other sequence) …
KeyError
Python
Programming Language
A KeyError means you tried to look up a key in a dictionary that does not exist. …
MemoryError
Python
Programming Language
A MemoryError means Python tried to allocate more memory than your computer has …
ModuleNotFoundError
Python
Programming Language
A ModuleNotFoundError means Python cannot find the module (library or package) …
NameError
Python
Programming Language
A NameError means Python found a name (a variable, function, or class) that it …
PermissionError
Python
Programming Language
A PermissionError means your Python program tried to access a file, folder, or …
RecursionError
Python
Programming Language
A RecursionError means a function called itself so many times that Python ran …
RuntimeError
Python
Programming Language
A RuntimeError is a general-purpose error that Python raises when something goes …
StopIteration
Python
Programming Language
StopIteration is a signal that an iterator has run out of items to give you. …
SyntaxError
Python
Programming Language
A SyntaxError means Python found something in your code that it cannot …
TimeoutError
Python
Programming Language
A TimeoutError means an operation started but did not finish within the allowed …
TypeError
Python
Programming Language
A TypeError means you tried to use a value in a way that does not match its …
UnicodeDecodeError
Python
Programming Language
A UnicodeDecodeError means Python tried to read text from a file or data source …
ValueError
Python
Programming Language
A ValueError means you gave a function a value of the right type, but the value …
ZeroDivisionError
Python
Programming Language
A ZeroDivisionError means your code tried to divide a number by zero.
Division …