Solution: Verify that your code indentation is correct. Such errors often occur when the indentation is inconsistent or incorrect.