{
  "reviewed": "2026-12",
  "featured": {
    "id": "essentials",
    "label": "Most common",
    "terms": [
      "SyntaxError",
      "IndentationError",
      "NameError",
      "AttributeError",
      "TypeError",
      "ValueError",
      "IndexError",
      "KeyError",
      "ZeroDivisionError",
      "ImportError",
      "ModuleNotFoundError",
      "FileNotFoundError",
      "RecursionError",
      "StopIteration",
      "UnicodeDecodeError"
    ]
  },
  "demo": [
    {
      "term": "IndexError",
      "gloss": "list index out of range"
    },
    {
      "term": "TypeError",
      "gloss": "wrong type for the operation"
    },
    {
      "term": "NameError",
      "gloss": "that name is not defined"
    },
    {
      "term": "ZeroDivisionError",
      "gloss": "you divided by zero"
    },
    {
      "term": "ModuleNotFoundError",
      "gloss": "that module is not installed"
    },
    {
      "term": "IndentationError",
      "gloss": "your indentation is off"
    },
    {
      "term": "AttributeError",
      "gloss": "that object has no such attribute"
    }
  ],
  "categories": [
    {
      "id": "syntax",
      "name": "Syntax & indentation",
      "short": "Syntax",
      "color": "#DC2626",
      "items": [
        {
          "term": "SyntaxError",
          "label": "Invalid Python",
          "detail": "Python could not parse your code, often a missing colon, bracket or quote. The caret in the traceback points near where parsing broke"
        },
        {
          "term": "IndentationError",
          "label": "Bad indentation",
          "detail": "Your indentation does not line up, for example a block that expected an indented line got none. Make the spacing consistent"
        },
        {
          "term": "TabError",
          "label": "Tabs vs spaces",
          "detail": "You mixed tabs and spaces for indentation in a way Python will not accept. Pick one, spaces are the convention"
        }
      ]
    },
    {
      "id": "name",
      "name": "Name & attribute",
      "short": "Name",
      "color": "#D97706",
      "items": [
        {
          "term": "NameError",
          "label": "Undefined name",
          "detail": "You used a name that does not exist yet, often a typo or a variable used before assignment. Check the spelling and the order"
        },
        {
          "term": "UnboundLocalError",
          "label": "Local used too early",
          "detail": "You read a local before assigning it, usually because assigning to it later in the function made it local. Use global or nonlocal, or assign first"
        },
        {
          "term": "AttributeError",
          "label": "No such attribute",
          "detail": "You accessed an attribute or method the object does not have, often a None where you expected an object. Check the type"
        }
      ]
    },
    {
      "id": "type",
      "name": "Type & value",
      "short": "Type",
      "color": "#2563EB",
      "items": [
        {
          "term": "TypeError",
          "label": "Wrong type",
          "detail": "You used a value of the wrong type for the operation, like adding a string to an int, or called something that is not callable. Convert or check the type"
        },
        {
          "term": "ValueError",
          "label": "Right type, wrong value",
          "detail": "The type is fine but the value is not allowed, like int('abc') or unpacking the wrong number of items. Validate the input"
        },
        {
          "term": "AssertionError",
          "label": "Assertion failed",
          "detail": "An assert statement evaluated to False. The condition you claimed was true was not, so check the assumption"
        },
        {
          "term": "UnicodeDecodeError",
          "label": "Cannot decode bytes",
          "detail": "Bytes could not be decoded with the given encoding, common when reading a non-utf-8 file as utf-8. Pass the right encoding or errors='replace'"
        },
        {
          "term": "UnicodeEncodeError",
          "label": "Cannot encode text",
          "detail": "A character could not be encoded into the target encoding, often non-ascii into ascii. Encode as utf-8 or handle the errors argument"
        }
      ]
    },
    {
      "id": "lookup",
      "name": "Lookup & index",
      "short": "Lookup",
      "color": "#7C3AED",
      "items": [
        {
          "term": "IndexError",
          "label": "Index out of range",
          "detail": "You indexed a sequence past its end, like lst[5] on a three-item list. Check len() or your loop bounds"
        },
        {
          "term": "KeyError",
          "label": "Missing dict key",
          "detail": "You looked up a key that is not in the dict. Test with 'in', use .get() for a default, or reach for a defaultdict"
        },
        {
          "term": "LookupError",
          "label": "Base of index/key",
          "detail": "The base class for IndexError and KeyError. You will usually see one of those two rather than this directly"
        }
      ]
    },
    {
      "id": "arithmetic",
      "name": "Arithmetic",
      "short": "Arithmetic",
      "color": "#0891B2",
      "items": [
        {
          "term": "ZeroDivisionError",
          "label": "Divided by zero",
          "detail": "You divided or took a modulo by zero. Guard the denominator, or handle the zero case before dividing"
        },
        {
          "term": "OverflowError",
          "label": "Number too big",
          "detail": "A result grew too large for its type, mostly with floats since ints are unbounded. Rescale the numbers, or use int or decimal instead"
        },
        {
          "term": "FloatingPointError",
          "label": "Float op failed",
          "detail": "A floating-point operation failed. Rare, only raised when float exceptions are explicitly enabled"
        },
        {
          "term": "ArithmeticError",
          "label": "Base of math errors",
          "detail": "The base class for ZeroDivisionError, OverflowError and FloatingPointError. Catch it to cover all three"
        }
      ]
    },
    {
      "id": "io",
      "name": "Import, file & OS",
      "short": "Import & OS",
      "color": "#16A34A",
      "items": [
        {
          "term": "ImportError",
          "label": "Import failed",
          "detail": "An import could not complete, for example a name that is not in the module you imported from. Check the name and the package"
        },
        {
          "term": "ModuleNotFoundError",
          "label": "Module not installed",
          "detail": "Python could not find the module at all, usually not installed or not on the path. pip install it or fix the import path"
        },
        {
          "term": "FileNotFoundError",
          "label": "No such file",
          "detail": "The file or directory you opened does not exist at that path. Check the path and the working directory"
        },
        {
          "term": "FileExistsError",
          "label": "File already there",
          "detail": "You tried to create something that already exists, like os.mkdir on an existing folder. Check first or pass exist_ok=True"
        },
        {
          "term": "PermissionError",
          "label": "Access denied",
          "detail": "The OS refused the operation for permission reasons. Check the file permissions or run with the right access"
        },
        {
          "term": "IsADirectoryError",
          "label": "It is a directory",
          "detail": "You treated a directory as a file, like open() on a folder. Point at an actual file"
        },
        {
          "term": "NotADirectoryError",
          "label": "It is not a directory",
          "detail": "You treated a file as if it were a directory. Check the path really is a folder"
        },
        {
          "term": "TimeoutError",
          "label": "Operation timed out",
          "detail": "A system-level operation, often a socket, ran past its timeout. Increase the timeout or handle the retry"
        },
        {
          "term": "ConnectionError",
          "label": "Connection problem",
          "detail": "The base for network failures like reset, refused or aborted. Handle the specific subclass or retry"
        },
        {
          "term": "ConnectionRefusedError",
          "label": "Connection refused",
          "detail": "Nothing was listening at that address and port, often a server that is not running yet. Check the host, the port and that the service is up"
        },
        {
          "term": "ConnectionResetError",
          "label": "Connection reset",
          "detail": "The other side dropped the connection mid-conversation. Usually worth retrying, with a short wait between attempts"
        },
        {
          "term": "BrokenPipeError",
          "label": "Writing to a closed pipe",
          "detail": "You wrote to a pipe or socket the other end had already closed, common when piping into head. Stop writing once the reader is gone"
        },
        {
          "term": "OSError",
          "label": "OS call failed",
          "detail": "The general system-call error and the base for the file and OS ones above. Read the errno for the specifics"
        },
        {
          "term": "IOError",
          "label": "Alias of OSError",
          "detail": "An old alias, IOError is just OSError now. You can catch either, they are the same class"
        }
      ]
    },
    {
      "id": "runtime",
      "name": "Runtime, iteration & system",
      "short": "Runtime",
      "color": "#DB2777",
      "items": [
        {
          "term": "RuntimeError",
          "label": "Generic runtime error",
          "detail": "A catch-all for errors that do not fit another category. Read the message, it usually explains the specific problem"
        },
        {
          "term": "PythonFinalizationError",
          "label": "Interpreter shutting down",
          "detail": "Raised when something, such as starting a thread, is tried while Python is shutting down. Added in Python 3.13"
        },
        {
          "term": "RecursionError",
          "label": "Too much recursion",
          "detail": "You hit the recursion depth limit, usually a base case that never triggers. Fix the base case or go iterative"
        },
        {
          "term": "NotImplementedError",
          "label": "Not implemented yet",
          "detail": "Raised on purpose to mark a method a subclass must implement, or a stub. Implement or override it"
        },
        {
          "term": "StopIteration",
          "label": "Iterator exhausted",
          "detail": "An iterator has no more items. next() raises it, and for-loops catch it for you, so you rarely handle it yourself"
        },
        {
          "term": "StopAsyncIteration",
          "label": "Async iterator done",
          "detail": "The async version of StopIteration, signalling an async iterator is finished. async for handles it for you"
        },
        {
          "term": "GeneratorExit",
          "label": "Generator closing",
          "detail": "Raised inside a generator when it is closed. Let it propagate rather than swallowing it, so cleanup runs"
        },
        {
          "term": "KeyboardInterrupt",
          "label": "Ctrl-C pressed",
          "detail": "The user interrupted the program, usually with Ctrl-C. Catch it only to clean up, then re-raise or exit"
        },
        {
          "term": "SystemExit",
          "label": "Program exiting",
          "detail": "Raised by sys.exit() to end the program. It inherits from BaseException, so except Exception will not catch it by accident, but a bare except will"
        },
        {
          "term": "MemoryError",
          "label": "Out of memory",
          "detail": "The program ran out of memory. Process data in chunks, free references, or use a leaner data structure"
        },
        {
          "term": "EOFError",
          "label": "End of input",
          "detail": "input() hit end-of-file with no data, for example a closed stdin. Handle the empty case"
        },
        {
          "term": "Exception",
          "label": "Base of most errors",
          "detail": "The base class for all normal errors. Catch it to handle anything short of exit signals, but be specific when you can"
        },
        {
          "term": "BaseException",
          "label": "Root of everything",
          "detail": "The root of the whole hierarchy, including exit signals. Do not catch this directly, catch Exception instead"
        },
        {
          "term": "ExceptionGroup",
          "label": "Bundle of errors",
          "detail": "Wraps several exceptions raised together, added in Python 3.11. Handle its parts with the except* syntax"
        }
      ]
    },
    {
      "id": "warnings",
      "name": "Warnings (not errors)",
      "short": "Warnings",
      "color": "#CA8A04",
      "items": [
        {
          "term": "SyntaxWarning",
          "label": "Suspicious syntax",
          "detail": "Your code runs but looks like a mistake, most often an invalid escape such as \"\\d\" in a normal string. Use a raw string: r\"\\d\""
        },
        {
          "term": "DeprecationWarning",
          "label": "Going away soon",
          "detail": "Something you use is deprecated and will be removed in a future version. Switch to the replacement the message names"
        },
        {
          "term": "FutureWarning",
          "label": "Behaviour will change",
          "detail": "A library warns that the way something behaves will change in a future release. Common in pandas, and worth fixing before you upgrade"
        },
        {
          "term": "UserWarning",
          "label": "A library warning",
          "detail": "The default category for warnings.warn(). Read the message, it is the library telling you something is off"
        },
        {
          "term": "RuntimeWarning",
          "label": "Dubious runtime behaviour",
          "detail": "Something questionable happened at runtime, such as a coroutine never awaited or NumPy dividing by zero"
        },
        {
          "term": "ResourceWarning",
          "label": "Resource not closed",
          "detail": "A file, socket or other resource was left open. Use a with block so it closes itself. Hidden unless warnings are turned on"
        }
      ]
    }
  ]
}
