Python Glossary Русский

all Python 3Exceptionsexception

SystemError

built-in exceptions

An internal interpreter error (non-fatal); usually worth reporting as a bug.

Syntax

raise SystemError

There is nothing to fix on your side when it appears: it means the interpreter itself, or a C extension, found its own state inconsistent. The right response is to reduce it to a minimal reproducer and file a bug with the Python version and traceback. Do not confuse it with SystemExit, which derives from BaseException and ends the program normally — SystemError is an ordinary Exception and will be caught by a broad except Exception.

Examples

try:
    raise SystemError
except SystemError as e:
    print(type(e).__name__)   # → SystemError

See also

Open in the full glossarydocs.python.orgReport an inaccuracy