Warning

This project is being split into 3 separate projects:

  • friendly_traceback,

  • friendly, and

  • friendly_idle.

The documentation does not reflect this change.

If you are a end-user, just install friendly until further notice.

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

`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

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

An `AttributeError` occurs when the code contains something like
    `object.x`
and `x` is not a method or attribute (variable) belonging to `object`.

BaseException

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

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

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

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

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

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

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

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

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

An `EOFError` is raised when the `input()` function hits
an end-of-file condition (EOF) without reading any data.

EnvironmentError

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

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

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

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

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

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

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

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

An `IndentationError` occurs when a given line of code is
not indented (aligned vertically with other lines) as expected.

IndexError

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

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

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

A `KeyError` is raised when a value is not found as a
key in a Python dict or in a similar object.

KeyboardInterrupt

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

`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

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

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

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

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

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

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

An `OverflowError` is raised when the result of an arithmetic operation
is too large to be handled by the computer's processor.

PermissionError

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

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

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

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

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

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

`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

A `SyntaxError` occurs when Python cannot understand your code.

SystemError

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

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

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

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

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

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

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

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

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

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

A `ValueError` indicates that a function or an operation
received an argument of the right type, but an inappropriate value.

WindowsError

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

A `ZeroDivisionError` occurs when you are attempting to divide a value
by zero either directly or by using some other mathematical operation.

Warnings

BytesWarning

No information is available about this warning.

DeprecationWarning

No information is available about this warning.

FutureWarning

No information is available about this warning.

ImportWarning

No information is available about this warning.

PendingDeprecationWarning

No information is available about this warning.

ResourceWarning

No information is available about this warning.

RuntimeWarning

No information is available about this warning.

SyntaxWarning

No information is available about this warning.

UnicodeWarning

No information is available about this warning.

UserWarning

No information is available about this warning.

Warning

No information is available about this warning.