Error Code Portal

Python error codes

Search by code or error message to find official explanations and troubleshooting or diagnostic links.

4,836 codes·14 products·84 official documents

Search runs in your browser. The same number can have different meanings in different products.

Python Code

62 results
CodeIssue and contextVendor and product
  • 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
  • SyntaxWarning

    Base class for warnings about dubious syntax. This warning is typically emitted when compiling Python source code, and usually won’t be reported when running already compiled code.

    PythonPython
  • SystemError

    Raised when the interpreter finds an internal error, but the situation does not look so serious to cause it to abandon all hope. The associated value is a string indicating what went wrong (in low-level terms). In CPython, this could be raised by incorrectly using Python’s C API, such as returning a NULL value without an exception set. If you’re confident that this exception wasn’t your fault, or the fault of a package you’re using, you should report this to the author or maintainer of your Python interpreter. Be sure to report the version of the Python interpreter (sys.version; it is also printed at the start of an interactive Python session), the exact error message (the exception’s associated value) and if possible the source of the program that triggered the error.

    PythonPython
  • TabError

    Raised when indentation contains an inconsistent use of tabs and spaces. This is a subclass of IndentationError.

    PythonPython
  • TimeoutError

    Raised when a system function timed out at the system level. Corresponds to errno ETIMEDOUT.

    PythonPython
  • TypeError

    Raised when an operation or function is applied to an object of inappropriate type. The associated value is a string giving details about the type mismatch. This exception may be raised by user code to indicate that an attempted operation on an object is not supported, and is not meant to be. If an object is meant to support a given operation but has not yet provided an implementation, NotImplementedError is the proper exception to raise. Passing arguments of the wrong type (e.g. passing a list when an int is expected) should result in a TypeError, but passing arguments with the wrong value (e.g. a number outside expected boundaries) should result in a ValueError.

    PythonPython
  • UnboundLocalError

    Raised when a reference is made to a local variable in a function or method, but no value has been bound to that variable. This is a subclass of NameError.

    PythonPython
  • UnicodeDecodeError

    Raised when a Unicode-related error occurs during decoding. It is a subclass of UnicodeError.

    PythonPython
  • UnicodeEncodeError

    Raised when a Unicode-related error occurs during encoding. It is a subclass of UnicodeError.

    PythonPython
  • UnicodeError

    Raised when a Unicode-related encoding or decoding error occurs. It is a subclass of ValueError. UnicodeError has attributes that describe the encoding or decoding error. For example, err.object[err.start:err.end] gives the particular invalid input that the codec failed on.

    PythonPython
  • UnicodeTranslateError

    Raised when a Unicode-related error occurs during translating. It is a subclass of UnicodeError.

    PythonPython
  • UnicodeWarning

    Base class for warnings related to Unicode.

    PythonPython
  • UserWarning

    Base class for warnings generated by user code.

    PythonPython
  • ValueError

    Raised when an operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as IndexError.

    PythonPython
  • Warning

    Base class for warning categories.

    PythonPython
  • ZeroDivisionError

    Raised when the second argument of a division or modulo operation is zero. The associated value is a string indicating the type of the operands and the operation.

    PythonPython

Codes by vendor