Generic information about various exceptions ============================================== .. note:: The content of this page is generated by running what.py located in the ``tests/`` directory. This needs to be done explicitly, independently of updating the documentation using Sphinx. This file contains the generic information provided by Friendly-traceback about built-in exceptions. By "generic information" we mean the information provided using ``what()`` in a friendly console. Some exceptions will never be seen by users of Friendly-traceback. For example, ``SystemExit`` and ``KeyboardInterrupt`` are never intercepted by Friendly-traceback. Furthermore, exceptions such as ``GeneratorExit``, ``FloatingPointError``, and ``StopAsyncIteration``, would likely never be seen. ``FloatingPointError`` is actually `not used by Python `_. ``BaseException``, ``Exception``, and ``ArithmeticError`` are base classes which are also not normally seen: some derived classes are normally used instead. Information compiled using Friendly version: 0.3.142, Python version: 3.8.10 Exceptions ---------- ArithmeticError ~~~~~~~~~~~~~~~ .. code-block:: none `ArithmeticError` is the base class for those built-in exceptions that are raised for various arithmetic errors. It is unusual that you are seeing this exception; normally, a more specific exception should have been raised. AssertionError ~~~~~~~~~~~~~~ .. code-block:: none In Python, the keyword `assert` is used in statements of the form `assert condition`, to confirm that `condition` is not `False`, nor equivalent to `False` such as an empty list, etc. If `condition` is `False` or equivalent, an `AssertionError` is raised. AttributeError ~~~~~~~~~~~~~~ .. code-block:: none An `AttributeError` occurs when the code contains something like `object.x` and `x` is not a method or attribute (variable) belonging to `object`. BaseException ~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. BlockingIOError ~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. BrokenPipeError ~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. BufferError ~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. ChildProcessError ~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. ConnectionAbortedError ~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. ConnectionError ~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. ConnectionRefusedError ~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. ConnectionResetError ~~~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. EOFError ~~~~~~~~ .. code-block:: none An `EOFError` is raised when the `input()` function hits an end-of-file condition (EOF) without reading any data. EnvironmentError ~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. Exception ~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. FileExistsError ~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. FileNotFoundError ~~~~~~~~~~~~~~~~~ .. code-block:: none A `FileNotFoundError` exception indicates that you are trying to open a file that cannot be found by Python. This could be because you misspelled the name of the file. FloatingPointError ~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. GeneratorExit ~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. IOError ~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. ImportError ~~~~~~~~~~~ .. code-block:: none An `ImportError` exception indicates that a certain object could not be imported from a module or package. Most often, this is because the name of the object is not spelled correctly. IndentationError ~~~~~~~~~~~~~~~~ .. code-block:: none An `IndentationError` occurs when a given line of code is not indented (aligned vertically with other lines) as expected. IndexError ~~~~~~~~~~ .. code-block:: none An `IndexError` occurs when you try to get an item from a list, a tuple, or a similar object (sequence), and use an index which does not exist; typically, this happens because the index you give is greater than the length of the sequence. InterruptedError ~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. IsADirectoryError ~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. KeyError ~~~~~~~~ .. code-block:: none A `KeyError` is raised when a value is not found as a key in a Python dict or in a similar object. KeyboardInterrupt ~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. LookupError ~~~~~~~~~~~ .. code-block:: none `LookupError` is the base class for the exceptions that are raised when a key or index used on a mapping or sequence is invalid. It can also be raised directly by codecs.lookup(). MemoryError ~~~~~~~~~~~ .. code-block:: none Like the name indicates, a `MemoryError` occurs when Python runs out of memory. This can happen if you create an object that is too big, like a list with too many items. ModuleNotFoundError ~~~~~~~~~~~~~~~~~~~ .. code-block:: none A `ModuleNotFoundError` exception indicates that you are trying to import a module that cannot be found by Python. This could be because you misspelled the name of the module or because it is not installed on your computer. NameError ~~~~~~~~~ .. code-block:: none A `NameError` exception indicates that a variable or function name is not known to Python. Most often, this is because there is a spelling mistake. However, sometimes it is because the name is used before being defined or given a value. NotADirectoryError ~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. NotImplementedError ~~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. OSError ~~~~~~~ .. code-block:: none An `OSError` exception is usually raised by the Operating System to indicate that an operation is not allowed or that a resource is not available. OverflowError ~~~~~~~~~~~~~ .. code-block:: none An `OverflowError` is raised when the result of an arithmetic operation is too large to be handled by the computer's processor. PermissionError ~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. ProcessLookupError ~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. RecursionError ~~~~~~~~~~~~~~ .. code-block:: none A `RecursionError` is raised when a function calls itself, directly or indirectly, too many times. It almost always indicates that you made an error in your code and that your program would never stop. ReferenceError ~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. RuntimeError ~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. StopAsyncIteration ~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. StopIteration ~~~~~~~~~~~~~ .. code-block:: none `StopIteration` is raised to indicate that an iterator has no more item to provide when its `__next__` method is called by the `next()` builtin function. SyntaxError ~~~~~~~~~~~ .. code-block:: none A `SyntaxError` occurs when Python cannot understand your code. SystemError ~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. SystemExit ~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. TabError ~~~~~~~~ .. code-block:: none A `TabError` indicates that you have used both spaces and tab characters to indent your code. This is not allowed in Python. Indenting your code means to have block of codes aligned vertically by inserting either spaces or tab characters at the beginning of lines. Python's recommendation is to always use spaces to indent your code. TimeoutError ~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. TypeError ~~~~~~~~~ .. code-block:: none A `TypeError` is usually caused by trying to combine two incompatible types of objects, by calling a function with the wrong type of object, or by trying to do an operation not allowed on a given type of object. UnboundLocalError ~~~~~~~~~~~~~~~~~ .. code-block:: none In Python, variables that are used inside a function are known as local variables. Before they are used, they must be assigned a value. A variable that is used before it is assigned a value is assumed to be defined outside that function; it is known as a `global` (or sometimes `nonlocal`) variable. You cannot assign a value to such a global variable inside a function without first indicating to Python that this is a global variable, otherwise you will see an `UnboundLocalError`. UnicodeDecodeError ~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. UnicodeEncodeError ~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. UnicodeError ~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. UnicodeTranslateError ~~~~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. ValueError ~~~~~~~~~~ .. code-block:: none A `ValueError` indicates that a function or an operation received an argument of the right type, but an inappropriate value. WindowsError ~~~~~~~~~~~~ .. code-block:: none No information is known about this exception. Please report this example to https://github.com/aroberge/friendly/issues. If you are using a REPL, use `www('bug')` to do so. If you are using the Friendly console, use `www()` to do an Internet search for this particular case. ZeroDivisionError ~~~~~~~~~~~~~~~~~ .. code-block:: none A `ZeroDivisionError` occurs when you are attempting to divide a value by zero either directly or by using some other mathematical operation. Warnings ---------- BytesWarning ~~~~~~~~~~~~ .. code-block:: none No information is available about this warning. DeprecationWarning ~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is available about this warning. FutureWarning ~~~~~~~~~~~~~ .. code-block:: none No information is available about this warning. ImportWarning ~~~~~~~~~~~~~ .. code-block:: none No information is available about this warning. PendingDeprecationWarning ~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: none No information is available about this warning. ResourceWarning ~~~~~~~~~~~~~~~ .. code-block:: none No information is available about this warning. RuntimeWarning ~~~~~~~~~~~~~~ .. code-block:: none No information is available about this warning. SyntaxWarning ~~~~~~~~~~~~~ .. code-block:: none No information is available about this warning. UnicodeWarning ~~~~~~~~~~~~~~ .. code-block:: none No information is available about this warning. UserWarning ~~~~~~~~~~~ .. code-block:: none No information is available about this warning. Warning ~~~~~~~ .. code-block:: none No information is available about this warning.