EC
errcodes.dev
HTTP
PostgreSQL
Linux
Python
Docker
21 languages Β· 7,377+ codes
errcodes.dev
/
Python
π
Python Built-in Exceptions
Python 3.12
75 codes
Built-in exceptions, warnings, and stdlib errors
All severities
ERROR
INFO
CRITICAL
WARNING
All tiers
Common
Notable
Critical
Showing
75
of
75
errors
Code
Message
Severity
Tier
SyntaxError
Invalid syntax
ERROR
Common
β
IndentationError
Incorrect indentation
ERROR
Common
β
NameError
Name not found in local or global scope
ERROR
Notable
β
TypeError
Operation applied to object of wrong type
ERROR
Notable
β
ValueError
Function argument has right type but inappropriate value
ERROR
Critical
β
AttributeError
Object does not have the specified attribute
ERROR
Notable
β
KeyError
Dictionary key not found
ERROR
Notable
β
IndexError
Sequence index out of range
ERROR
Notable
β
ImportError
Could not import module or member
ERROR
β
ModuleNotFoundError
Module not found
ERROR
β
OSError
Operating system-related error
ERROR
β
FileNotFoundError
File or directory not found
ERROR
Critical
β
PermissionError
Operation not permitted
ERROR
β
RuntimeError
Error doesn't fall in other categories
ERROR
Critical
β
RecursionError
Maximum recursion depth exceeded
ERROR
Critical
β
StopIteration
Iterator has no more items
INFO
Common
β
GeneratorExit
Generator's close() method was called
INFO
Notable
β
SystemExit
Program exited (sys.exit() called)
INFO
Notable
β
KeyboardInterrupt
User pressed Ctrl+C
INFO
Notable
β
MemoryError
Operation ran out of memory
CRITICAL
β
OverflowError
Result of an arithmetic operation is too large to be represented
ERROR
Critical
β
ZeroDivisionError
Division or modulo by zero
ERROR
Notable
β
UnicodeDecodeError
Unicode decoding error
ERROR
Critical
β
UnicodeEncodeError
Unicode encoding error
ERROR
Critical
β
AssertionError
Assertion statement failed
ERROR
Notable
β
NotImplementedError
Abstract method not implemented
ERROR
Notable
β
TimeoutError
Operation timed out
ERROR
β
ConnectionError
Connection-related error
ERROR
β
BrokenPipeError
Pipe is broken
ERROR
β
IsADirectoryError
Operation expected a file, but got a directory
ERROR
Critical
β
EOFError
End of file reached
ERROR
Notable
β
UnboundLocalError
Local variable referenced before assignment
ERROR
Notable
β
FloatingPointError
Floating-point operation failed
ERROR
Notable
β
BufferError
Buffer operation failed
ERROR
Notable
β
StopAsyncIteration
Async iterator exhausted
INFO
Common
β
BlockingIOError
Non-blocking I/O would block
ERROR
Notable
β
ChildProcessError
Child process operation failed
ERROR
Notable
β
ConnectionAbortedError
Connection aborted by peer
ERROR
Notable
β
ConnectionRefusedError
Connection refused by server
ERROR
Notable
β
ConnectionResetError
Connection reset by peer
ERROR
Notable
β
FileExistsError
File or directory already exists
ERROR
Common
β
InterruptedError
System call interrupted by signal
ERROR
Notable
β
NotADirectoryError
Not a directory
ERROR
Common
β
ProcessLookupError
Process not found
ERROR
Notable
β
ReferenceError
Weak reference expired
ERROR
Notable
β
SystemError
Internal Python interpreter error
CRITICAL
β
TabError
Inconsistent use of tabs and spaces
ERROR
Common
β
UnicodeTranslateError
Unicode translation failed
ERROR
Notable
β
ExceptionGroup
Multiple exceptions raised simultaneously
ERROR
Critical
β
DeprecationWarning
Deprecated feature used
WARNING
Common
β
ResourceWarning
Unclosed resource
WARNING
Notable
β
RuntimeWarning
Suspicious runtime behaviour
WARNING
Notable
β
UserWarning
User-issued warning
WARNING
Common
β
json.JSONDecodeError
Invalid JSON
ERROR
Notable
β
subprocess.CalledProcessError
Called process returned non-zero exit code
ERROR
Notable
β
subprocess.TimeoutExpired
Subprocess timed out
ERROR
Notable
β
re.error
Invalid regular expression
ERROR
Notable
β
asyncio.CancelledError
Async task was cancelled
WARNING
Notable
β
ssl.SSLError
TLS/SSL certificate or handshake error
ERROR
Critical
β
pickle.PicklingError
Object cannot be pickled
ERROR
Notable
β
struct.error
Binary struct pack/unpack failed
ERROR
Notable
β
io.UnsupportedOperation
I/O operation not supported
ERROR
Common
β
EncodingWarning
Locale or encoding mismatch detected
WARNING
Common
β
FutureWarning
Behaviour will change in a future Python release
WARNING
Common
β
PendingDeprecationWarning
Feature may be deprecated in a future release
WARNING
Common
β
ImportWarning
Probable mistake in module import
WARNING
Common
β
SyntaxWarning
Dubious or potentially invalid syntax
WARNING
Common
β
UnicodeWarning
Unicode comparison or conversion issue
WARNING
Common
β
BytesWarning
Bytes or buffer compared with str
WARNING
Common
β
BaseExceptionGroup
Group of BaseException instances (Python 3.11+)
ERROR
Notable
β
urllib.error.URLError
URL request failed β network or DNS error
ERROR
Notable
β
http.client.HTTPException
Low-level HTTP protocol error
ERROR
Notable
β
csv.Error
CSV parsing or writing error
ERROR
Common
β
zipfile.BadZipFile
ZIP file is corrupt or not a valid ZIP
ERROR
Common
β
socket.error
Socket-level network error (alias for OSError)
ERROR
Notable
β