IndentationError
A kind of syntax error raised when lines are indented inconsistently or a block is missing its indented body.
In more detail
Messages include expected an indented block and unindent does not match any outer indentation level. Mixing tabs and spaces is a common cause; let your editor insert four spaces.
Related terms
- exception — An error object a program raises to stop normal flow and report that something went wrong.
- traceback — The report Python prints when an unhandled exception stops a program, listing the chain of calls that led there and ending with the error.
Taught in
- Reading A Traceback Like A Professional — Hands-on Python: Complete Video Course & Book