Fix Python IndentationError: unindent does not match any outer indentation level – Python Tutorial

By | March 29, 2022

In this tutorial, we will introduce you how to fix IndentationError: unindent does not match any outer indentation level in python script.

Why does this error occur?

Because both of white spaces and tab are used for indent in python script.

How to fix this error?

We can open notepad++ and click View->Show Symbol->Show White Space and TAB.

View white space and tab in notepad++

Then you will see:

Fix Python IndentationError: unindent does not match any outer indentation level - Python Tutorial

Then, we can replace all TAB indent with white spaces.

Finally, we will see this error is fixed.

Leave a Reply