Incorrect spacing or mixing tabs and spaces in code blocks.
Python uses whitespace indentation to define code blocks (functions, loops, conditionals) rather than curly braces. An `IndentationError` occurs at compile time when indentation levels are mismatched or inconsistent.
Common causes: mixing tabs and 4 spaces in the same file, misplaced indent after an `if`/`def`/`for` line, or pasting code with inconsistent whitespace.
1def calculate_total(price, tax):2 total = price + tax3 return total # Unexpected indent level!1def calculate_total(price, tax):2 total = price + tax3 return total # Correct: aligned with 4 spacesSimulate standard system builds to trigger compiler trace records and track memory crashes locally.
Line 3 is indented with 6 spaces while line 2 is indented with 4 spaces. Python expects statements inside the same code block to share the exact same indentation depth.