Error code search
Search by code or error message to find official explanations and troubleshooting or diagnostic links.
Search runs in your browser. The same number can have different meanings in different products.
Code list
4,836 results- BytesWarning
Base class for warnings related to bytes and bytearray.
PythonPython - ChildProcessError
Raised when an operation on a child process failed. Corresponds to errno ECHILD.
PythonPython - ConnectionAbortedError
A subclass of ConnectionError, raised when a connection attempt is aborted by the peer. Corresponds to errno ECONNABORTED.
PythonPython - ConnectionError
A base class for connection-related issues. Subclasses are BrokenPipeError, ConnectionAbortedError, ConnectionRefusedError and ConnectionResetError.
PythonPython - ConnectionRefusedError
A subclass of ConnectionError, raised when a connection attempt is refused by the peer. Corresponds to errno ECONNREFUSED.
PythonPython - ConnectionResetError
A subclass of ConnectionError, raised when a connection is reset by the peer. Corresponds to errno ECONNRESET.
PythonPython - DeprecationWarning
Base class for warnings about deprecated features when those warnings are intended for other Python developers. Ignored by the default warning filters, except in the __main__ module (PEP 565). Enabling the Python Development Mode shows this warning. The deprecation policy is described in PEP 387.
PythonPython - EOFError
Raised when the input() function hits an end-of-file condition (EOF) without reading any data. (Note: the io.TextIOBase.read() and io.IOBase.readline() methods return an empty string when they hit EOF.)
PythonPython - EncodingWarning
Base class for warnings related to encodings. See Opt-in EncodingWarning for details.
PythonPython - ExceptionGroup
Both of these exception types wrap the exceptions in the sequence excs. The msg parameter must be a string. The difference between the two classes is that BaseExceptionGroup extends BaseException and it can wrap any exception, while ExceptionGroup extends Exception and it can only wrap subclasses of Exception. This design is so that except Exception catches an ExceptionGroup but not BaseExceptionGroup. The BaseExceptionGroup constructor returns an ExceptionGroup rather than a BaseExceptionGroup if all contained exceptions are Exception instances, so it can be used to make the selection automatic. The ExceptionGroup constructor, on the other hand, raises a TypeError if any contained exception is not an Exception subclass. Exception groups are generic over the type of their contained exceptions. Note that BaseExceptionGroup defines __new__(), so subclasses that need a different constructor signature need to override that rather than __init__(). For example, the following defines an exception group subclass which accepts an exit_code and constructs the group’s message from it. Like ExceptionGroup, any subclass of BaseExceptionGroup which is also a subclass of Exception can only wrap instances of Exception.
PythonPython - FileExistsError
Raised when trying to create a file or directory which already exists. Corresponds to errno EEXIST.
PythonPython - FileNotFoundError
Raised when a file or directory is requested but doesn’t exist. Corresponds to errno ENOENT.
PythonPython - FloatingPointError
Not currently used.
PythonPython - FutureWarning
Base class for warnings about deprecated features when those warnings are intended for end users of applications that are written in Python.
PythonPython - ImportCycleError
A subclass of ImportError which is raised when a lazy import fails because it (directly or indirectly) tries to import itself.
PythonPython - ImportError
Raised when the import statement has troubles trying to load a module. Also raised when the “from list” in from ... import has a name that cannot be found. The optional name and path keyword-only arguments set the corresponding attributes:
PythonPython - ImportWarning
Base class for warnings about probable mistakes in module imports. Ignored by the default warning filters. Enabling the Python Development Mode shows this warning.
PythonPython - IndentationError
Base class for syntax errors related to incorrect indentation. This is a subclass of SyntaxError.
PythonPython - IndexError
Raised when a sequence subscript is out of range. (Slice indices are silently truncated to fall in the allowed range; if an index is not an integer, TypeError is raised.)
PythonPython - InterruptedError
Raised when a system call is interrupted by an incoming signal. Corresponds to errno EINTR.
PythonPython - IsADirectoryError
Raised when a file operation (such as os.remove()) is requested on a directory. Corresponds to errno EISDIR.
PythonPython - KeyError
Raised when a mapping (dictionary) key is not found in the set of existing keys.
PythonPython - LookupError
The base class for the exceptions that are raised when a key or index used on a mapping or sequence is invalid: IndexError, KeyError. This can be raised directly by codecs.lookup().
PythonPython - MemoryError
Raised when an operation runs out of memory but the situation may still be rescued (by deleting some objects). The associated value is a string indicating what kind of (internal) operation ran out of memory. Note that because of the underlying memory management architecture (C’s malloc() function), the interpreter may not always be able to completely recover from this situation; it nevertheless raises an exception so that a stack traceback can be printed, in case a run-away program was the cause.
PythonPython - ModuleNotFoundError
A subclass of ImportError which is raised by import when a module could not be located. It is also raised when None is found in sys.modules.
PythonPython - NameError
Raised when a local or global name is not found. This applies only to unqualified names. The associated value is an error message that includes the name that could not be found. The optional name keyword-only argument sets the attribute:
PythonPython - NotADirectoryError
Raised when a directory operation (such as os.listdir()) is requested on something which is not a directory. On most POSIX platforms, it may also be raised if an operation attempts to open or traverse a non-directory file as if it were a directory. Corresponds to errno ENOTDIR.
PythonPython - NotImplementedError
This exception is derived from RuntimeError. In user defined base classes, abstract methods should raise this exception when they require derived classes to override the method, or while the class is being developed to indicate that the real implementation still needs to be added.
PythonPython - OSErrorEnvironmentError · IOErrorOSError
This exception is raised when a system function returns a system-related error, including I/O failures such as “file not found” or “disk full” (not for illegal argument types or other incidental errors). The second form of the constructor sets the corresponding attributes, described below. The attributes default to None if not specified. For backwards compatibility, if three arguments are passed, the args attribute contains only a 2-tuple of the first two constructor arguments. The constructor often actually returns a subclass of OSError, as described in OS exceptions below. The particular subclass depends on the final errno value. This behaviour only occurs when constructing OSError directly or via an alias, and is not inherited when subclassing.
PythonPython - OverflowError
Raised when the result of an arithmetic operation is too large to be represented. This cannot occur for integers (which would rather raise MemoryError than give up). However, for historical reasons, OverflowError is sometimes raised for integers that are outside a required range. Because of the lack of standardization of floating-point exception handling in C, most floating-point operations are not checked.
PythonPython - PendingDeprecationWarning
Base class for warnings about features which are obsolete and expected to be deprecated in the future, but are not deprecated at the moment. This class is rarely used as emitting a warning about a possible upcoming deprecation is unusual, and DeprecationWarning is preferred for already active deprecations. Ignored by the default warning filters. Enabling the Python Development Mode shows this warning. The deprecation policy is described in PEP 387.
PythonPython - PermissionError
Raised when trying to run an operation without the adequate access rights - for example filesystem permissions. Corresponds to errno EACCES, EPERM, and ENOTCAPABLE.
PythonPython - ProcessLookupError
Raised when a given process doesn’t exist. Corresponds to errno ESRCH.
PythonPython - PythonFinalizationError
This exception is derived from RuntimeError. It is raised when an operation is blocked during interpreter shutdown also known as Python finalization. Examples of operations which can be blocked with a PythonFinalizationError during the Python finalization: See also the sys.is_finalizing() function.
PythonPython - RecursionError
This exception is derived from RuntimeError. It is raised when the interpreter detects that the maximum recursion depth (see sys.getrecursionlimit()) is exceeded.
PythonPython - ReferenceError
This exception is raised when a weak reference proxy, created by the weakref.proxy() function, is used to access an attribute of the referent after it has been garbage collected. For more information on weak references, see the weakref module.
PythonPython - ResourceWarning
Base class for warnings related to resource usage. Ignored by the default warning filters. Enabling the Python Development Mode shows this warning.
PythonPython - RuntimeError
Raised when an error is detected that doesn’t fall in any of the other categories. The associated value is a string indicating what precisely went wrong.
PythonPython - RuntimeWarning
Base class for warnings about dubious runtime behavior.
PythonPython - SyntaxError
Raised when the parser encounters a syntax error. This may occur in an import statement, in a call to the built-in functions compile(), exec(), or eval(), or when reading the initial script or standard input (also interactively). The str() of the exception instance returns only the error message. Details is a tuple whose members are also available as separate attributes.
PythonPython