Indentationerror unindent does not match any outer indentation level как исправить

When I compile the Python code below, I get IndentationError: unindent does not match any outer indentation level import sys def Factorial(n): # Return factorial result = 1 for i in rang...

When I compile the Python code below, I get

IndentationError: unindent does not match any outer indentation level


import sys

def Factorial(n): # Return factorial
    result = 1
    for i in range (1,n):
        result = result * i
    print "factorial is ",result
    return result

Why?

Martijn Pieters's user avatar

asked Jan 29, 2009 at 16:34

cbrulak's user avatar

7

Other posters are probably correct…there might be spaces mixed in with your tabs. Try doing a search & replace to replace all tabs with a few spaces.

Try this:

import sys

def Factorial(n): # return factorial
    result = 1
    for i in range (1,n):
        result = result * i
    print "factorial is ",result
    return result

print Factorial(10)

Machavity's user avatar

Machavity

30.5k27 gold badges90 silver badges100 bronze badges

answered Jan 29, 2009 at 16:37

Kevin Tighe's user avatar

Kevin TigheKevin Tighe

19.7k4 gold badges35 silver badges36 bronze badges

8

IMPORTANT:
Spaces are the preferred method — see PEP 8 Indentation and Tabs or Spaces?. (Thanks to @Siha for this.)

For Sublime Text users:

Set Sublime Text to use tabs for indentation:
View —> Indentation —> Convert Indentation to Tabs

Uncheck the Indent Using Spaces option as well in the same sub-menu above.
This will immediately resolve this issue.

wjandrea's user avatar

wjandrea

26.2k8 gold badges57 silver badges78 bronze badges

answered May 8, 2014 at 11:44

activatedgeek's user avatar

activatedgeekactivatedgeek

6,3593 gold badges28 silver badges50 bronze badges

6

To easily check for problems with tabs/spaces you can actually do this:

python -m tabnanny yourfile.py

or you can just set up your editor correctly of course :-)

answered Feb 4, 2009 at 21:50

André's user avatar

AndréAndré

12.9k3 gold badges33 silver badges45 bronze badges

3

Are you sure you are not mixing tabs and spaces in your indentation white space? (That will cause that error.)

Note, it is recommended that you don’t use tabs in Python code. See the style guide. You should configure Notepad++ to insert spaces for tabs.

Peter Mortensen's user avatar

answered Jan 29, 2009 at 16:41

zdan's user avatar

zdanzdan

28.2k7 gold badges59 silver badges68 bronze badges

2

Whenever I’ve encountered this error, it’s because I’ve somehow mixed up tabs and spaces in my editor.

answered Jan 29, 2009 at 16:45

Dana's user avatar

DanaDana

31.6k17 gold badges62 silver badges72 bronze badges

0

If you are using Vim, hit escape and then type

gg=G

This auto indents everything and will clear up any spaces you have thrown in.

answered May 7, 2015 at 9:43

cbartondock's user avatar

cbartondockcbartondock

6446 silver badges17 bronze badges

0

If you use Python’s IDLE editor you can do as it suggests in one of similar error messages:

1) select all, e.g. Ctrl + A

2) Go to Format -> Untabify Region

3) Double check your indenting is still correct, save and rerun your program.

I’m using Python 2.5.4

Tshilidzi Mudau's user avatar

answered Jun 13, 2013 at 15:26

Gatica's user avatar

GaticaGatica

5931 gold badge6 silver badges13 bronze badges

0

The line: result = result * i should be indented (it is the body of the for-loop).

Or — you have mixed space and tab characters

answered Jan 29, 2009 at 16:38

Abgan's user avatar

AbganAbgan

3,68022 silver badges31 bronze badges

2

For Spyder users goto
Source > Fix Indentation
to fix the issue immediately

answered Jan 5, 2020 at 16:56

Abdulbasith's user avatar

0

Using Visual studio code

If you are using vs code than, it will convert all mix Indentation to either space or tabs using this simple steps below.

  1. press Ctrl + Shift + p

  2. type indent using spaces

  3. Press Enter

answered Jul 24, 2020 at 8:01

Devil's user avatar

DevilDevil

97211 silver badges17 bronze badges

1

On Atom

go to

Packages > Whitespace > Convert Spaces to Tabs

Then check again your file indentation:

python -m tabnanny yourFile.py

or

>python
>>> help("yourFile.py")

answered Mar 11, 2015 at 14:27

loretoparisi's user avatar

loretoparisiloretoparisi

15.3k11 gold badges98 silver badges138 bronze badges

If you use notepad++, do a «replace» with extended search mode to find t and replace with four spaces.

answered Mar 20, 2014 at 17:23

Jackie Lee's user avatar

Jackie LeeJackie Lee

2393 silver badges3 bronze badges

Looks to be an indentation problem. You don’t have to match curly brackets in Python but you do have to match indentation levels.

The best way to prevent space/tab problems is to display invisible characters within your text editor. This will give you a quick way to prevent and/or resolve indentation-related errors.

Also, injecting copy-pasted code is a common source for this type of problem.

answered Jul 31, 2012 at 20:27

Matt Kahl's user avatar

Matt KahlMatt Kahl

7337 silver badges9 bronze badges

If you use colab, then you can do avoid the error by this commands.

  1. < Ctrl-A >
  2. < Tab >
  3. < Shift-Tab >

It’s all [tab] indentation convert to [space] indentation. Then OK.

answered Nov 25, 2021 at 3:40

WangSung's user avatar

WangSungWangSung

2012 silver badges5 bronze badges

0

Just a addition. I had a similar problem with the both indentations in Notepad++.

  1. Unexcepted indentation
  2. Outer Indentation Level

    Go to —-> Search tab —-> tap on replace —-> hit the radio button Extended below —> Now replace t with four spaces

    Go to —-> Search tab —-> tap on replace —-> hit the radio button Extended below —> Now replace n with nothing

answered Nov 12, 2015 at 21:42

I was using Jupyter notebook and tried almost all of the above solutions (adapting to my scenario) to no use. I then went line by line, deleted all spaces for each line and replaced with tab. That solved the issue.

answered Dec 15, 2018 at 4:48

Cur123's user avatar

Cur123Cur123

911 silver badge8 bronze badges

For what its worth, my docstring was indented too much and this also throws the same error

class junk: 
     """docstring is indented too much""" 
    def fun(): return   

IndentationError: unindent does not match any outer indentation level

answered Mar 5, 2019 at 23:00

plfrick's user avatar

plfrickplfrick

1,05912 silver badges12 bronze badges

1

I’m using Sublime text in Ubuntu OS. To fix this issue go to

view -> Indentation -> convert indentation to tabs

Dharman's user avatar

Dharman

29.3k21 gold badges80 silver badges131 bronze badges

answered Mar 3, 2021 at 10:28

Rahal Kanishka's user avatar

It could be because the function above it is not indented the same way.
i.e.

class a:
    def blah:
      print("Hello world")
    def blah1:
      print("Hello world")

answered Feb 14, 2014 at 2:52

Ali's user avatar

0

Since I realize there’s no answer specific to spyder,I’ll add one:
Basically, carefully look at your if statement and make sure all if, elif and else have the same spacing that is they’re in the same line at the start like so:

def your_choice(answer):
    if answer>5:
        print("You're overaged")
    elif answer<=5 and answer>1: 
            print("Welcome to the toddler's club!")
    else:
            print("No worries mate!")

answered Dec 7, 2018 at 13:42

NelsonGon's user avatar

NelsonGonNelsonGon

12.9k6 gold badges27 silver badges57 bronze badges

0

I am using Sublime Text 3 with a Flask project. I fixed the error using View > Indentation > Tab Width: 4 after unselected Indent Using Spaces

answered Jun 30, 2020 at 15:52

bmc's user avatar

bmcbmc

8171 gold badge12 silver badges20 bronze badges

This is because there is a mix-up of both tabs and spaces.
You can either remove all the spaces and replace them with tabs.

Or,
Try writing this:

#!/usr/bin/python -tt

at the beginning of the code. This line resolves any differences between tabs and spaces.

answered Mar 5, 2014 at 13:43

Eragon's user avatar

I had the same issue yesterday, it was indentation error, was using sublime text editor. took my hours trying to fix it and at the end I ended up copying the code into VI text editor and it just worked fine. ps python is too whitespace sensitive, make sure not to mix space and tab.

answered Jun 26, 2014 at 15:57

user3731311's user avatar

0

for Atom Users, Packages ->whitspace -> remove trailing whitespaces
this worked for me

answered Jul 28, 2015 at 12:41

Aha's user avatar

I had a function defined, but it did not had any content apart from its function comments…

def foo(bar):
    # Some awesome temporary comment.
    # But there is actually nothing in the function!
    # D'Oh!

It yelled :

  File "foobar.py", line 69

                                ^
IndentationError: expected an indented block

(note that the line the ^ mark points to is empty)

Multiple solutions:

1: Just comment out the function

2: Add function comment

def foo(bar):
    '' Some awesome comment. This comment could be just one space.''

3: Add line that does nothing

def foo(bar):
    0

In any case, make sure to make it obvious why it is an empty function — for yourself, or for your peers that will use your code

answered Dec 10, 2018 at 14:07

Cedric's user avatar

CedricCedric

5,02511 gold badges40 silver badges59 bronze badges

1

Firstly, just to remind you there is a logical error you better keep result=1 or else your output will be result=0 even after the loop runs.

Secondly you can write it like this:

import sys

def Factorial(n): # Return factorial
  result = 0
  for i in range (1,n):
     result = result * i

  print "factorial is ",result
  return result

Leaving a line will tell the python shell that the FOR statements have ended. If you have experience using the python shell then you can understand why we have to leave a line.

answered Dec 25, 2018 at 11:49

Faisal Ahmed Farooq's user avatar

For example:

1. def convert_distance(miles):
2.   km = miles * 1.6
3.   return km

In this code same situation occurred for me. Just delete the previous indent spaces of
line 2 and 3, and then either use tab or space. Never use both. Give proper indentation while writing code in python.
For Spyder goto Source > Fix Indentation. Same goes to VC Code and sublime text or any other editor. Fix the indentation.

answered Apr 11, 2020 at 6:48

Ayush Aryan's user avatar

Ayush AryanAyush Aryan

1913 silver badges4 bronze badges

I got this error even though I didn’t have any tabs in my code, and the reason was there was a superfluous closing parenthesis somewhere in my code. I should have figured this out earlier because it was messing up spaces before and after some equal signs… If you find anything off even after running Reformat code in your IDE (or manually running autopep8), make sure all your parentheses match, starting backwards from the weird spaces before/after the first equals sign.

answered Jul 24, 2020 at 7:52

Bartleby's user avatar

BartlebyBartleby

9551 gold badge12 silver badges14 bronze badges

I had the same error because of another thing, it was not about tabs vs. spaces. I had the first if slightly more indented than an else: much further down. If it is just about a space or two, you might oversee it after a long code block. Same thing with docstrings:

"""comment comment 
comment
"""

They also need to be aligned, see the other answer on the same page here.

Reproducible with a few lines:

if a==1:
    print('test')
 else:
    print('test2')

Throws:

  File "<ipython-input-127-52bbac35ad7d>", line 3
    else:
         ^
IndentationError: unindent does not match any outer indentation level

answered Oct 1, 2021 at 14:19

questionto42's user avatar

questionto42questionto42

5,7513 gold badges44 silver badges73 bronze badges

I actually get this in pylint from a bracket in the wrong place.

I’m adding this answer because I sent a lot of time looking for tabs.
In this case, it has nothing to do with tabs or spaces.

    def some_instance_function(self):

        json_response = self.some_other_function()

        def compare_result(json_str, variable):
            """
            Sub function for comparison
            """
            json_value = self.json_response.get(json_str, f"{json_str} not found")

            if str(json_value) != str(variable):
                logging.error("Error message: %s, %s", 
                    json_value,
                    variable) # <-- Putting the bracket here causes the error below
                    #) <-- Moving the bracket here fixes the issue
                return False
            return True

        logging.debug("Response: %s", self.json_response)
        #        ^----The pylint error reports here 

answered Oct 11, 2022 at 10:13

SpiRail's user avatar

SpiRailSpiRail

1,36719 silver badges28 bronze badges

1

When I compile the Python code below, I get

IndentationError: unindent does not match any outer indentation level


import sys

def Factorial(n): # Return factorial
    result = 1
    for i in range (1,n):
        result = result * i
    print "factorial is ",result
    return result

Why?

Martijn Pieters's user avatar

asked Jan 29, 2009 at 16:34

cbrulak's user avatar

7

Other posters are probably correct…there might be spaces mixed in with your tabs. Try doing a search & replace to replace all tabs with a few spaces.

Try this:

import sys

def Factorial(n): # return factorial
    result = 1
    for i in range (1,n):
        result = result * i
    print "factorial is ",result
    return result

print Factorial(10)

Machavity's user avatar

Machavity

30.5k27 gold badges90 silver badges100 bronze badges

answered Jan 29, 2009 at 16:37

Kevin Tighe's user avatar

Kevin TigheKevin Tighe

19.7k4 gold badges35 silver badges36 bronze badges

8

IMPORTANT:
Spaces are the preferred method — see PEP 8 Indentation and Tabs or Spaces?. (Thanks to @Siha for this.)

For Sublime Text users:

Set Sublime Text to use tabs for indentation:
View —> Indentation —> Convert Indentation to Tabs

Uncheck the Indent Using Spaces option as well in the same sub-menu above.
This will immediately resolve this issue.

wjandrea's user avatar

wjandrea

26.2k8 gold badges57 silver badges78 bronze badges

answered May 8, 2014 at 11:44

activatedgeek's user avatar

activatedgeekactivatedgeek

6,3593 gold badges28 silver badges50 bronze badges

6

To easily check for problems with tabs/spaces you can actually do this:

python -m tabnanny yourfile.py

or you can just set up your editor correctly of course :-)

answered Feb 4, 2009 at 21:50

André's user avatar

AndréAndré

12.9k3 gold badges33 silver badges45 bronze badges

3

Are you sure you are not mixing tabs and spaces in your indentation white space? (That will cause that error.)

Note, it is recommended that you don’t use tabs in Python code. See the style guide. You should configure Notepad++ to insert spaces for tabs.

Peter Mortensen's user avatar

answered Jan 29, 2009 at 16:41

zdan's user avatar

zdanzdan

28.2k7 gold badges59 silver badges68 bronze badges

2

Whenever I’ve encountered this error, it’s because I’ve somehow mixed up tabs and spaces in my editor.

answered Jan 29, 2009 at 16:45

Dana's user avatar

DanaDana

31.6k17 gold badges62 silver badges72 bronze badges

0

If you are using Vim, hit escape and then type

gg=G

This auto indents everything and will clear up any spaces you have thrown in.

answered May 7, 2015 at 9:43

cbartondock's user avatar

cbartondockcbartondock

6446 silver badges17 bronze badges

0

If you use Python’s IDLE editor you can do as it suggests in one of similar error messages:

1) select all, e.g. Ctrl + A

2) Go to Format -> Untabify Region

3) Double check your indenting is still correct, save and rerun your program.

I’m using Python 2.5.4

Tshilidzi Mudau's user avatar

answered Jun 13, 2013 at 15:26

Gatica's user avatar

GaticaGatica

5931 gold badge6 silver badges13 bronze badges

0

The line: result = result * i should be indented (it is the body of the for-loop).

Or — you have mixed space and tab characters

answered Jan 29, 2009 at 16:38

Abgan's user avatar

AbganAbgan

3,68022 silver badges31 bronze badges

2

For Spyder users goto
Source > Fix Indentation
to fix the issue immediately

answered Jan 5, 2020 at 16:56

Abdulbasith's user avatar

0

Using Visual studio code

If you are using vs code than, it will convert all mix Indentation to either space or tabs using this simple steps below.

  1. press Ctrl + Shift + p

  2. type indent using spaces

  3. Press Enter

answered Jul 24, 2020 at 8:01

Devil's user avatar

DevilDevil

97211 silver badges17 bronze badges

1

On Atom

go to

Packages > Whitespace > Convert Spaces to Tabs

Then check again your file indentation:

python -m tabnanny yourFile.py

or

>python
>>> help("yourFile.py")

answered Mar 11, 2015 at 14:27

loretoparisi's user avatar

loretoparisiloretoparisi

15.3k11 gold badges98 silver badges138 bronze badges

If you use notepad++, do a «replace» with extended search mode to find t and replace with four spaces.

answered Mar 20, 2014 at 17:23

Jackie Lee's user avatar

Jackie LeeJackie Lee

2393 silver badges3 bronze badges

Looks to be an indentation problem. You don’t have to match curly brackets in Python but you do have to match indentation levels.

The best way to prevent space/tab problems is to display invisible characters within your text editor. This will give you a quick way to prevent and/or resolve indentation-related errors.

Also, injecting copy-pasted code is a common source for this type of problem.

answered Jul 31, 2012 at 20:27

Matt Kahl's user avatar

Matt KahlMatt Kahl

7337 silver badges9 bronze badges

If you use colab, then you can do avoid the error by this commands.

  1. < Ctrl-A >
  2. < Tab >
  3. < Shift-Tab >

It’s all [tab] indentation convert to [space] indentation. Then OK.

answered Nov 25, 2021 at 3:40

WangSung's user avatar

WangSungWangSung

2012 silver badges5 bronze badges

0

Just a addition. I had a similar problem with the both indentations in Notepad++.

  1. Unexcepted indentation
  2. Outer Indentation Level

    Go to —-> Search tab —-> tap on replace —-> hit the radio button Extended below —> Now replace t with four spaces

    Go to —-> Search tab —-> tap on replace —-> hit the radio button Extended below —> Now replace n with nothing

answered Nov 12, 2015 at 21:42

I was using Jupyter notebook and tried almost all of the above solutions (adapting to my scenario) to no use. I then went line by line, deleted all spaces for each line and replaced with tab. That solved the issue.

answered Dec 15, 2018 at 4:48

Cur123's user avatar

Cur123Cur123

911 silver badge8 bronze badges

For what its worth, my docstring was indented too much and this also throws the same error

class junk: 
     """docstring is indented too much""" 
    def fun(): return   

IndentationError: unindent does not match any outer indentation level

answered Mar 5, 2019 at 23:00

plfrick's user avatar

plfrickplfrick

1,05912 silver badges12 bronze badges

1

I’m using Sublime text in Ubuntu OS. To fix this issue go to

view -> Indentation -> convert indentation to tabs

Dharman's user avatar

Dharman

29.3k21 gold badges80 silver badges131 bronze badges

answered Mar 3, 2021 at 10:28

Rahal Kanishka's user avatar

It could be because the function above it is not indented the same way.
i.e.

class a:
    def blah:
      print("Hello world")
    def blah1:
      print("Hello world")

answered Feb 14, 2014 at 2:52

Ali's user avatar

0

Since I realize there’s no answer specific to spyder,I’ll add one:
Basically, carefully look at your if statement and make sure all if, elif and else have the same spacing that is they’re in the same line at the start like so:

def your_choice(answer):
    if answer>5:
        print("You're overaged")
    elif answer<=5 and answer>1: 
            print("Welcome to the toddler's club!")
    else:
            print("No worries mate!")

answered Dec 7, 2018 at 13:42

NelsonGon's user avatar

NelsonGonNelsonGon

12.9k6 gold badges27 silver badges57 bronze badges

0

I am using Sublime Text 3 with a Flask project. I fixed the error using View > Indentation > Tab Width: 4 after unselected Indent Using Spaces

answered Jun 30, 2020 at 15:52

bmc's user avatar

bmcbmc

8171 gold badge12 silver badges20 bronze badges

This is because there is a mix-up of both tabs and spaces.
You can either remove all the spaces and replace them with tabs.

Or,
Try writing this:

#!/usr/bin/python -tt

at the beginning of the code. This line resolves any differences between tabs and spaces.

answered Mar 5, 2014 at 13:43

Eragon's user avatar

I had the same issue yesterday, it was indentation error, was using sublime text editor. took my hours trying to fix it and at the end I ended up copying the code into VI text editor and it just worked fine. ps python is too whitespace sensitive, make sure not to mix space and tab.

answered Jun 26, 2014 at 15:57

user3731311's user avatar

0

for Atom Users, Packages ->whitspace -> remove trailing whitespaces
this worked for me

answered Jul 28, 2015 at 12:41

Aha's user avatar

I had a function defined, but it did not had any content apart from its function comments…

def foo(bar):
    # Some awesome temporary comment.
    # But there is actually nothing in the function!
    # D'Oh!

It yelled :

  File "foobar.py", line 69

                                ^
IndentationError: expected an indented block

(note that the line the ^ mark points to is empty)

Multiple solutions:

1: Just comment out the function

2: Add function comment

def foo(bar):
    '' Some awesome comment. This comment could be just one space.''

3: Add line that does nothing

def foo(bar):
    0

In any case, make sure to make it obvious why it is an empty function — for yourself, or for your peers that will use your code

answered Dec 10, 2018 at 14:07

Cedric's user avatar

CedricCedric

5,02511 gold badges40 silver badges59 bronze badges

1

Firstly, just to remind you there is a logical error you better keep result=1 or else your output will be result=0 even after the loop runs.

Secondly you can write it like this:

import sys

def Factorial(n): # Return factorial
  result = 0
  for i in range (1,n):
     result = result * i

  print "factorial is ",result
  return result

Leaving a line will tell the python shell that the FOR statements have ended. If you have experience using the python shell then you can understand why we have to leave a line.

answered Dec 25, 2018 at 11:49

Faisal Ahmed Farooq's user avatar

For example:

1. def convert_distance(miles):
2.   km = miles * 1.6
3.   return km

In this code same situation occurred for me. Just delete the previous indent spaces of
line 2 and 3, and then either use tab or space. Never use both. Give proper indentation while writing code in python.
For Spyder goto Source > Fix Indentation. Same goes to VC Code and sublime text or any other editor. Fix the indentation.

answered Apr 11, 2020 at 6:48

Ayush Aryan's user avatar

Ayush AryanAyush Aryan

1913 silver badges4 bronze badges

I got this error even though I didn’t have any tabs in my code, and the reason was there was a superfluous closing parenthesis somewhere in my code. I should have figured this out earlier because it was messing up spaces before and after some equal signs… If you find anything off even after running Reformat code in your IDE (or manually running autopep8), make sure all your parentheses match, starting backwards from the weird spaces before/after the first equals sign.

answered Jul 24, 2020 at 7:52

Bartleby's user avatar

BartlebyBartleby

9551 gold badge12 silver badges14 bronze badges

I had the same error because of another thing, it was not about tabs vs. spaces. I had the first if slightly more indented than an else: much further down. If it is just about a space or two, you might oversee it after a long code block. Same thing with docstrings:

"""comment comment 
comment
"""

They also need to be aligned, see the other answer on the same page here.

Reproducible with a few lines:

if a==1:
    print('test')
 else:
    print('test2')

Throws:

  File "<ipython-input-127-52bbac35ad7d>", line 3
    else:
         ^
IndentationError: unindent does not match any outer indentation level

answered Oct 1, 2021 at 14:19

questionto42's user avatar

questionto42questionto42

5,7513 gold badges44 silver badges73 bronze badges

I actually get this in pylint from a bracket in the wrong place.

I’m adding this answer because I sent a lot of time looking for tabs.
In this case, it has nothing to do with tabs or spaces.

    def some_instance_function(self):

        json_response = self.some_other_function()

        def compare_result(json_str, variable):
            """
            Sub function for comparison
            """
            json_value = self.json_response.get(json_str, f"{json_str} not found")

            if str(json_value) != str(variable):
                logging.error("Error message: %s, %s", 
                    json_value,
                    variable) # <-- Putting the bracket here causes the error below
                    #) <-- Moving the bracket here fixes the issue
                return False
            return True

        logging.debug("Response: %s", self.json_response)
        #        ^----The pylint error reports here 

answered Oct 11, 2022 at 10:13

SpiRail's user avatar

SpiRailSpiRail

1,36719 silver badges28 bronze badges

1

When I compile the Python code below, I get

IndentationError: unindent does not match any outer indentation level


import sys

def Factorial(n): # Return factorial
    result = 1
    for i in range (1,n):
        result = result * i
    print "factorial is ",result
    return result

Why?

Martijn Pieters's user avatar

asked Jan 29, 2009 at 16:34

cbrulak's user avatar

7

Other posters are probably correct…there might be spaces mixed in with your tabs. Try doing a search & replace to replace all tabs with a few spaces.

Try this:

import sys

def Factorial(n): # return factorial
    result = 1
    for i in range (1,n):
        result = result * i
    print "factorial is ",result
    return result

print Factorial(10)

Machavity's user avatar

Machavity

30.5k27 gold badges90 silver badges100 bronze badges

answered Jan 29, 2009 at 16:37

Kevin Tighe's user avatar

Kevin TigheKevin Tighe

19.7k4 gold badges35 silver badges36 bronze badges

8

IMPORTANT:
Spaces are the preferred method — see PEP 8 Indentation and Tabs or Spaces?. (Thanks to @Siha for this.)

For Sublime Text users:

Set Sublime Text to use tabs for indentation:
View —> Indentation —> Convert Indentation to Tabs

Uncheck the Indent Using Spaces option as well in the same sub-menu above.
This will immediately resolve this issue.

wjandrea's user avatar

wjandrea

26.2k8 gold badges57 silver badges78 bronze badges

answered May 8, 2014 at 11:44

activatedgeek's user avatar

activatedgeekactivatedgeek

6,3593 gold badges28 silver badges50 bronze badges

6

To easily check for problems with tabs/spaces you can actually do this:

python -m tabnanny yourfile.py

or you can just set up your editor correctly of course :-)

answered Feb 4, 2009 at 21:50

André's user avatar

AndréAndré

12.9k3 gold badges33 silver badges45 bronze badges

3

Are you sure you are not mixing tabs and spaces in your indentation white space? (That will cause that error.)

Note, it is recommended that you don’t use tabs in Python code. See the style guide. You should configure Notepad++ to insert spaces for tabs.

Peter Mortensen's user avatar

answered Jan 29, 2009 at 16:41

zdan's user avatar

zdanzdan

28.2k7 gold badges59 silver badges68 bronze badges

2

Whenever I’ve encountered this error, it’s because I’ve somehow mixed up tabs and spaces in my editor.

answered Jan 29, 2009 at 16:45

Dana's user avatar

DanaDana

31.6k17 gold badges62 silver badges72 bronze badges

0

If you are using Vim, hit escape and then type

gg=G

This auto indents everything and will clear up any spaces you have thrown in.

answered May 7, 2015 at 9:43

cbartondock's user avatar

cbartondockcbartondock

6446 silver badges17 bronze badges

0

If you use Python’s IDLE editor you can do as it suggests in one of similar error messages:

1) select all, e.g. Ctrl + A

2) Go to Format -> Untabify Region

3) Double check your indenting is still correct, save and rerun your program.

I’m using Python 2.5.4

Tshilidzi Mudau's user avatar

answered Jun 13, 2013 at 15:26

Gatica's user avatar

GaticaGatica

5931 gold badge6 silver badges13 bronze badges

0

The line: result = result * i should be indented (it is the body of the for-loop).

Or — you have mixed space and tab characters

answered Jan 29, 2009 at 16:38

Abgan's user avatar

AbganAbgan

3,68022 silver badges31 bronze badges

2

For Spyder users goto
Source > Fix Indentation
to fix the issue immediately

answered Jan 5, 2020 at 16:56

Abdulbasith's user avatar

0

Using Visual studio code

If you are using vs code than, it will convert all mix Indentation to either space or tabs using this simple steps below.

  1. press Ctrl + Shift + p

  2. type indent using spaces

  3. Press Enter

answered Jul 24, 2020 at 8:01

Devil's user avatar

DevilDevil

97211 silver badges17 bronze badges

1

On Atom

go to

Packages > Whitespace > Convert Spaces to Tabs

Then check again your file indentation:

python -m tabnanny yourFile.py

or

>python
>>> help("yourFile.py")

answered Mar 11, 2015 at 14:27

loretoparisi's user avatar

loretoparisiloretoparisi

15.3k11 gold badges98 silver badges138 bronze badges

If you use notepad++, do a «replace» with extended search mode to find t and replace with four spaces.

answered Mar 20, 2014 at 17:23

Jackie Lee's user avatar

Jackie LeeJackie Lee

2393 silver badges3 bronze badges

Looks to be an indentation problem. You don’t have to match curly brackets in Python but you do have to match indentation levels.

The best way to prevent space/tab problems is to display invisible characters within your text editor. This will give you a quick way to prevent and/or resolve indentation-related errors.

Also, injecting copy-pasted code is a common source for this type of problem.

answered Jul 31, 2012 at 20:27

Matt Kahl's user avatar

Matt KahlMatt Kahl

7337 silver badges9 bronze badges

If you use colab, then you can do avoid the error by this commands.

  1. < Ctrl-A >
  2. < Tab >
  3. < Shift-Tab >

It’s all [tab] indentation convert to [space] indentation. Then OK.

answered Nov 25, 2021 at 3:40

WangSung's user avatar

WangSungWangSung

2012 silver badges5 bronze badges

0

Just a addition. I had a similar problem with the both indentations in Notepad++.

  1. Unexcepted indentation
  2. Outer Indentation Level

    Go to —-> Search tab —-> tap on replace —-> hit the radio button Extended below —> Now replace t with four spaces

    Go to —-> Search tab —-> tap on replace —-> hit the radio button Extended below —> Now replace n with nothing

answered Nov 12, 2015 at 21:42

I was using Jupyter notebook and tried almost all of the above solutions (adapting to my scenario) to no use. I then went line by line, deleted all spaces for each line and replaced with tab. That solved the issue.

answered Dec 15, 2018 at 4:48

Cur123's user avatar

Cur123Cur123

911 silver badge8 bronze badges

For what its worth, my docstring was indented too much and this also throws the same error

class junk: 
     """docstring is indented too much""" 
    def fun(): return   

IndentationError: unindent does not match any outer indentation level

answered Mar 5, 2019 at 23:00

plfrick's user avatar

plfrickplfrick

1,05912 silver badges12 bronze badges

1

I’m using Sublime text in Ubuntu OS. To fix this issue go to

view -> Indentation -> convert indentation to tabs

Dharman's user avatar

Dharman

29.3k21 gold badges80 silver badges131 bronze badges

answered Mar 3, 2021 at 10:28

Rahal Kanishka's user avatar

It could be because the function above it is not indented the same way.
i.e.

class a:
    def blah:
      print("Hello world")
    def blah1:
      print("Hello world")

answered Feb 14, 2014 at 2:52

Ali's user avatar

0

Since I realize there’s no answer specific to spyder,I’ll add one:
Basically, carefully look at your if statement and make sure all if, elif and else have the same spacing that is they’re in the same line at the start like so:

def your_choice(answer):
    if answer>5:
        print("You're overaged")
    elif answer<=5 and answer>1: 
            print("Welcome to the toddler's club!")
    else:
            print("No worries mate!")

answered Dec 7, 2018 at 13:42

NelsonGon's user avatar

NelsonGonNelsonGon

12.9k6 gold badges27 silver badges57 bronze badges

0

I am using Sublime Text 3 with a Flask project. I fixed the error using View > Indentation > Tab Width: 4 after unselected Indent Using Spaces

answered Jun 30, 2020 at 15:52

bmc's user avatar

bmcbmc

8171 gold badge12 silver badges20 bronze badges

This is because there is a mix-up of both tabs and spaces.
You can either remove all the spaces and replace them with tabs.

Or,
Try writing this:

#!/usr/bin/python -tt

at the beginning of the code. This line resolves any differences between tabs and spaces.

answered Mar 5, 2014 at 13:43

Eragon's user avatar

I had the same issue yesterday, it was indentation error, was using sublime text editor. took my hours trying to fix it and at the end I ended up copying the code into VI text editor and it just worked fine. ps python is too whitespace sensitive, make sure not to mix space and tab.

answered Jun 26, 2014 at 15:57

user3731311's user avatar

0

for Atom Users, Packages ->whitspace -> remove trailing whitespaces
this worked for me

answered Jul 28, 2015 at 12:41

Aha's user avatar

I had a function defined, but it did not had any content apart from its function comments…

def foo(bar):
    # Some awesome temporary comment.
    # But there is actually nothing in the function!
    # D'Oh!

It yelled :

  File "foobar.py", line 69

                                ^
IndentationError: expected an indented block

(note that the line the ^ mark points to is empty)

Multiple solutions:

1: Just comment out the function

2: Add function comment

def foo(bar):
    '' Some awesome comment. This comment could be just one space.''

3: Add line that does nothing

def foo(bar):
    0

In any case, make sure to make it obvious why it is an empty function — for yourself, or for your peers that will use your code

answered Dec 10, 2018 at 14:07

Cedric's user avatar

CedricCedric

5,02511 gold badges40 silver badges59 bronze badges

1

Firstly, just to remind you there is a logical error you better keep result=1 or else your output will be result=0 even after the loop runs.

Secondly you can write it like this:

import sys

def Factorial(n): # Return factorial
  result = 0
  for i in range (1,n):
     result = result * i

  print "factorial is ",result
  return result

Leaving a line will tell the python shell that the FOR statements have ended. If you have experience using the python shell then you can understand why we have to leave a line.

answered Dec 25, 2018 at 11:49

Faisal Ahmed Farooq's user avatar

For example:

1. def convert_distance(miles):
2.   km = miles * 1.6
3.   return km

In this code same situation occurred for me. Just delete the previous indent spaces of
line 2 and 3, and then either use tab or space. Never use both. Give proper indentation while writing code in python.
For Spyder goto Source > Fix Indentation. Same goes to VC Code and sublime text or any other editor. Fix the indentation.

answered Apr 11, 2020 at 6:48

Ayush Aryan's user avatar

Ayush AryanAyush Aryan

1913 silver badges4 bronze badges

I got this error even though I didn’t have any tabs in my code, and the reason was there was a superfluous closing parenthesis somewhere in my code. I should have figured this out earlier because it was messing up spaces before and after some equal signs… If you find anything off even after running Reformat code in your IDE (or manually running autopep8), make sure all your parentheses match, starting backwards from the weird spaces before/after the first equals sign.

answered Jul 24, 2020 at 7:52

Bartleby's user avatar

BartlebyBartleby

9551 gold badge12 silver badges14 bronze badges

I had the same error because of another thing, it was not about tabs vs. spaces. I had the first if slightly more indented than an else: much further down. If it is just about a space or two, you might oversee it after a long code block. Same thing with docstrings:

"""comment comment 
comment
"""

They also need to be aligned, see the other answer on the same page here.

Reproducible with a few lines:

if a==1:
    print('test')
 else:
    print('test2')

Throws:

  File "<ipython-input-127-52bbac35ad7d>", line 3
    else:
         ^
IndentationError: unindent does not match any outer indentation level

answered Oct 1, 2021 at 14:19

questionto42's user avatar

questionto42questionto42

5,7513 gold badges44 silver badges73 bronze badges

I actually get this in pylint from a bracket in the wrong place.

I’m adding this answer because I sent a lot of time looking for tabs.
In this case, it has nothing to do with tabs or spaces.

    def some_instance_function(self):

        json_response = self.some_other_function()

        def compare_result(json_str, variable):
            """
            Sub function for comparison
            """
            json_value = self.json_response.get(json_str, f"{json_str} not found")

            if str(json_value) != str(variable):
                logging.error("Error message: %s, %s", 
                    json_value,
                    variable) # <-- Putting the bracket here causes the error below
                    #) <-- Moving the bracket here fixes the issue
                return False
            return True

        logging.debug("Response: %s", self.json_response)
        #        ^----The pylint error reports here 

answered Oct 11, 2022 at 10:13

SpiRail's user avatar

SpiRailSpiRail

1,36719 silver badges28 bronze badges

1

Python uses indentation to define the scope and extent of code blocks in constructs like class, function, conditional statements and loops. You can use both spaces and tabs to indent your code, and if you use both methods when writing your code, you will raise the error: IndentationError: unindent does not match any outer indentation level.

We will go through the error in detail and an example to learn how to solve it.


Table of contents

  • IndentationError: unindent does not match any outer indentation level
    • What is Indentation in Python?
  • Example: Mixing Indentation in Function
    • Solution
  • Summary

IndentationError: unindent does not match any outer indentation level

What is Indentation in Python?

Indentation is vital for constructing programs in Python. It refers to the correct use of white space to start a code block. With indentations, we can quickly identify the beginning and endpoint of any code block in our program. Let’s look at how indentation in Python works visually:

code indentation in Python
Code indentation in Python

To indicate a code block in Python, you must indent each block line by the same amount. You can use four spaces or one tab, a typical indentation for Python. According to the conventions in PEP 8, four white spaces is preferable. You can use indentation to nest code blocks within code blocks.

Python objects if you use both spaces and tabs to indent your code. You need to use one form of indentation, and this can be tricky because you cannot see the difference between spaces and tabs.

The error commonly occurs when you copy code from other sources to your script. The code you are copying may have a different indentation to what you are using.

The error can also occur if you have used indentation in the wrong place or have not used any indentation.

Example: Mixing Indentation in Function

Let’s write a program that calculates the square roots of a list of numbers and prints the result to the console. We will start by defining the function to calculate the square root of a number:

def get_square_roots(number_list):

    for number in number_list:

        sqrt_number = number ** 0.5

	    print(f'The square root of {number} is {sqrt_number}')

The function uses a for loop to iterate through every number in the list you will pass. We use the exponentiation operator to calculate the square root of the number and then print the result. Next, we will define the list of numbers and then call the get_square_roots() function.

number_list = [4, 9, 16, 25, 36]

get_square_roots(number_list)

Let’s run the code and see what happens:

sqrt_number = number ** 0.5
                          ^
IndentationError: unindent does not match any outer indentation level

The code returns the IndentationError, and the tick indicates the line responsible for the error.

Solution

We can use a text editor like Sublime Text to see the indentation style in our code by highlighting it, as shown below.

Code block with mixed indentation style
Code block with mixed indentation style

Each line represents a tab, and a dot represents a space. We can see a mix of spaces and tabs in the code snippet, particularly the line sqrt_number = number ** 0.5. To fix this, you can change replace the indentation on the other lines with four white spaces as this is the preferred indentation method. Alternatively, you can use tabs. Let’s look at the revised code in the text editor:

Code block with consistent indentation style
Code block with consistent indentation style

We can see each line has spaces instead of tabs. Let’s run the code to see what happens:

The square root of 4 is 2.0
The square root of 9 is 3.0
The square root of 16 is 4.0
The square root of 25 is 5.0
The square root of 36 is 6.0

The program returns the square root of each number in the list we pass to the function. You do not need to use a text editor to find differences in indentation style, but it does make it easier to spot them. Alternatively, you can manually go through each line in your code and stick to one indentation style.

Summary

Congratulations on reading to the end of this tutorial! The error “indentationerror: unindent does not match any outer indentation level” occurs when you mix spaces and tabs to indent your code. To solve this error, ensure all your code uses either spaces or tabs in your program. You can use a text editor to highlight your code to make it easier to spot the differences. Otherwise, you can go over the lines in your code and stick to one indentation style. To minimise the likelihood of this error, you can write your code in a text editor or Integrated Development Environment (IDE) like PyCharm, which automatically indent your code in a consistent style.

For further reading on Python code structure, go to the article: How to Solve Python UnboundLocalError: local variable referenced before assignment.

Go to the online courses page on Python to learn more about Python for data science and machine learning.

Have fun and happy researching!

In this post , we will see How to Fix Various Indentation Errors in Python.

Spacing is important in Python since the coding is dependent of the place or line where a code block starts or ends. Hence Indentation is crucial in Python coding.

P.S. – Once you read this post , go through our earlier post for extra tips –How To Fix – Indentation Problem in Python ? 


if( aicp_can_see_ads() ) {

}

Let us see the various types of Indentation Errors in Python –

1. IndentationError: unexpected indent –


Consider the example below –

>>>    print "hello world"
IndentationError: unexpected indent

The reason for this is the “EXTRA SPACE” before the command “print”

Fix –


if( aicp_can_see_ads() ) {

}

  • Check if  spaces mixed in with your tabs. Try doing a search & replace to replace all tabs with a few spaces.
  • Remove Extra Spaces
    Better to use Spaces than Tabs.
  • For Sublime Text users –  Set Sublime Text to use tabs for indentation: View –> Indentation –> Convert Indentation to Tabs . Uncheck the Indent Using Spaces option as well in the same sub-menu above.
  • For  Notepad++ , Change Tab Settings to 4 spaces
    Go to Settings -> Preferences -> Tab Settings -> Replace by spaces

2. IndendationError: Unindent does not match any outer indentation level –


This happens when Python cannot decide whether a specific statement belongs to a specific Code-Block or Not (due to Indentation – might be copy-paste code).

For instance, in the following, is the final print supposed to be part of the if clause, or not?

Example Below –


if( aicp_can_see_ads() ) {

}

>>> if acc_name == "NYC":
...   print "New York Region !"
... print "Where do I belong ?"
IndendationError: unindent does not match any outer indentation level

Fix

  • Check if  spaces mixed in with your tabs. Try doing a search & replace to replace all tabs with a few spaces.
  • Remove Extra Spaces
  • Better to use Spaces than Tabs.
  • For Sublime Text users –  Set Sublime Text to use tabs for indentation: View –> Indentation –> Convert Indentation to Tabs . Uncheck the Indent Using Spaces option as well in the same sub-menu above.
  • For  Notepad++ , Change Tab Settings to 4 spaces
    Go to Settings -> Preferences -> Tab Settings -> Replace by spaces

3. IndentationError: expected an indented block –


Normally occurs when a code block (if/while/for statement , function block etc.) , does not have spaces.  See example below –


if( aicp_can_see_ads() ) {

}

This line of code has the same number of spaces at the start as the one before, but the last line was expected to start a block (e.g. if/while/for statement, function definition).

>>> def foo():
... print "hello world"
IndentationError: expected an indented block

Fix


if( aicp_can_see_ads() ) {

}

  • Check if  spaces mixed in with your tabs. Try doing a search & replace to replace all tabs with a few spaces.
  • Remove Extra Spaces
    Better to use Spaces than Tabs.
  • For Sublime Text users –  Set Sublime Text to use tabs for indentation: View –> Indentation –> Convert Indentation to Tabs . Uncheck the Indent Using Spaces option as well in the same sub-menu above.
  • For  Notepad++ , Change Tab Settings to 4 spaces
    Go to Settings -> Preferences -> Tab Settings -> Replace by spaces

Hope this helps .

Other Interesting Reads –

  • How To Fix – “Ssl: Certificate_Verify_Failed” Error in Python ?

  • How To Make Your Laptop or Desktop A Public Server (NGROK) ?

  • How To Setup Spark Scala SBT in Eclipse

  • How To Save & Reload a Python Machine Learning Model using Pickle ?

[the_ad id=”1420″]


if( aicp_can_see_ads() ) {

}

python indentation,python indentation error, unindent does not match any outer indentation level , expected an indented block , python expected an indented block, indentationerror, indented block python, indentation, python, pycharm, django, python fix indentation,python indentation fixer,python fix,python indentation rules,python fix indentation,indented block in python,indentationerror
python indentation ,python indentation checker ,python indentation error ,python indentationerror unexpected indent ,python indentation rules ,python indentation shortcut ,python indentationerror expected an indented block ,python indentation example ,python indentation error fix ,python indentation annoying ,python indentation automatic ,python indentation and spacing ,python indentation atom ,python indentation alternative ,python indentation arguments ,python indentation after while loop ,python indentation antlr ,python indentation best practices ,python indentation block ,python indentation brackets ,python indentation blank line ,python indentation broken ,python indentation button ,python indented block error ,python indent block of code ,python indentation codeforces ,python indentation convention ,python indentation contains tabs ,python indentation command line ,python indentation code ,python indentation does not match ,python indentation definition ,python indentation docs ,python indentation delete ,python indentation disable ,python indentation docstring ,python dictionary indentation ,python default indentation ,python indentation error fix online ,python indentation error check online ,python indentation error notepad++ ,python indentation error unindent ,python indentation formatter ,python indentation fix ,python indentation for loop ,python indentation for if ,python indentation function arguments ,python indentation function ,python indentation for ,python indentation format ,python indentation guide ,python indentation grammar ,python indentation geany ,vim indent python ,python get indentation level ,python get indentation ,python group indent ,python get index of string ,python indentation how many spaces ,python indentation hell ,python indentation helper ,python indentation haskell ,python indent html ,python indent hotkey ,python hanging indentation ,python heredoc indentation ,python indentation in visual studio code ,python indentation in notepad++ ,python indentation in hindi ,python indentation in vscode ,python indentation is not a multiple of four ,python indentation if statement ,python indentation in vim ,python indentation issues ,python indentation js ,python indent json ,python indent json command line ,indentation python jupyter ,python json indent=4 ,python json indent level ,python json indent tab ,python jsonpickle indent ,python kate indentation ,python keyboard indent indented python key ,python indentation long lines ,python indentation level ,python indentation line break ,python indentation length ,python indentation line ,python indent long if statement ,python indent left ,python indent list comprehension ,python indentation meaning ,python indentation meme ,python indentation multiple lines ,python indentation matters ,python indentation multiline string ,python mixed indentation ,python method indentation ,python markdown indentation ,python indentation notepad++ ,python indentation number of spaces ,python indentation not working ,python indentation new line ,python indentation nested ,python indentation number ,python indent no ,python notepad++ indentation error ,python indentation online ,python indentation of output ,python indentation of ,python-indent-offset ,python-indent-offset spacemacs ,python outer indentation level ,python object indentation ,python over-indented ,python indentation pep8 ,python indentation problem ,python indentation print ,python indentation pycharm ,python indentation purpose ,python indent plugin notepad++ ,python indent paragraph ,python print indentation error ,python triple quotes indentation ,qgis python indentation error ,indentation python c'est quoi ,python indentation reddit ,python indentation rules pdf ,python indentation return ,python indentation recommendation ,python indentation remove ,python indentation range ,python indentation right ,python indentation spaces ,python indentation space or tab ,python indentation solver ,python indentation sublime text 3 ,python indentation syntax ,python indentation size ,python indentation syntax error ,python indentation tool ,python indentation tab or space ,python indentation tab ,python indentation tutorial ,python indentation tab vs space ,python indentation try except ,python indentation tutorialspoint ,python indentation to spaces ,python indentation using ,python indent unindent ,python indent unexpected ,python uses indentation to indicate a block of code ,python uses indentation ,python uses indentation for blocks ,python unexpected indentation error ,python url indentation ,python indentation vscode ,python indentation validator ,python indentation vim ,python indentation vs braces ,python indentation visual studio ,python indentation variable scope ,python indentation vs spaces ,python indenting vs ,python indentation w3schools ,python indentation while loop ,python indentation windows linux ,python indentation width ,python indentation with 2 spaces ,python indentation wrong ,python indentation working ,python indent whole block ,python xml indentation ,python indentation in xcode ,xcode python indentation problems ,python yaml indentation ,python your indentation is outright incorrect ,python yaml indent list ,yasnippet python indentation ,youtube python indentation ,python indentation ,python indentation check ,python check indentation in notepad++ ,python indentation check online ,python indentation checker online ,python indent checker online ,python indent check online ,python indentation corrector ,python code indentation checker ,python indentation online checker ,python indentation check tool ,python indentation error sublime ,python indentation error after for loop ,python indentation error after if ,atom python indentation error ,python avoid indentation error ,python getting an indentation error ,python expected indented block error ,blender python indentation error ,check python indentation error ,python comment indentation error ,python class indentation error ,indentation error python codecademy ,python causing indentation error ,vs code python indentation error ,python command line indentation error ,python indentation error def ,python indentation error unindent does not match ,python docstring indentation error ,python error inconsistent indentation detected ,indentation error python deutsch ,python indentationerror expected an indented block for loop ,python indentation error example ,python indentation error else ,python indent expected error ,python elif indentation error ,python except indentation error ,indentation error python eclipse ,python indentation error for loop ,python indentation error for print ,python find indentation error ,python for indentation error ,indentation error in python for if ,geany python indentation error ,python keep getting indentation error ,python indentation error handling ,python how to fix indentation error ,how to check python indentation error ,python indentation error if ,indentation error in python ,indentation error in python 3 ,indentation error in python for loop ,indentation error in python print ,python idle indentation error ,indentation error in python vscode ,indentation error in python sublime text ,what is python indentation error ,how to handle indentation error in python ,python indentation error linux ,indentation error in python if loop ,indentation error meaning python ,maya python indentation error ,python multiline comment indentation error ,python indentation error nedir ,python nested if indentation error ,python indentation error online ,indentation error on python ,indentation error in python stack overflow ,raspberry pi python indentation error ,python indentation error remove ,python return indentation error ,python indentation error solve ,python shell indentation error ,python script indentation error ,visual studio python indentation error ,python if statement indentation error ,python terminal indentation error ,python try indentation error ,sublime text python indentation error ,python indentationerror unexpected unindent ,python indentationerror unexpected indent block ,python indentation error vim ,vscode python indentation error ,visual studio code python indentation error ,python while indentation error ,
python with indentation error ,indentation error in python while loop ,meaning of indentation error in python ,python indentationerror unexpected indent notepad++ ,python indentationerror unexpected indent comment ,vscode python indentationerror unexpected indent ,python 2.7 indentationerror unexpected indent ,python try indentationerror unexpected indent ,python ast indentationerror unexpected indent ,python exec indentationerror unexpected indent ,indentationerror unexpected indent python class ,python command line indentationerror unexpected indent ,indentationerror unexpected indent python visual studio code ,python def indentationerror unexpected indent ,python indentationerror unexpected indent error ,python if else indentationerror unexpected indent ,python parsing error indentationerror unexpected indent ,erro python indentationerror unexpected indent ,python for indentationerror unexpected indent ,indentationerror unexpected indent python for loop ,indentationerror unexpected indent python function ,python open file indentationerror unexpected indent ,python + indentationerror unexpected indent ,how to fix indentationerror unexpected indent in python ,indentationerror unexpected indent python ,indentation error in python unexpected indent ,indentationerror unexpected indent python 3 ,python indentationerror unexpected indent if ,indentationerror unexpected indent python jupyter notebook ,error unexpected indent python ,linux python indentationerror unexpected indent ,python for loop indentationerror unexpected indent ,python indentationerror unexpected indent print ,indentationerror unexpected indent pada python ,python unexpected indent for loop ,python shell indentationerror unexpected indent ,python sorry indentationerror unexpected indent ,python timeit indentationerror unexpected indent ,vim python indentationerror unexpected indent ,python while indentationerror unexpected indent ,what is indentationerror unexpected indent in python ,python 3 indentation rules ,indentation rules for python ,indentation rules in python ,indentation rules in python 3 ,python rules of indentation ,python idle indentation shortcut ,python auto indent shortcut ,vscode python indent shortcut ,python indent block shortcut ,indentation shortcut in python ,python shortcut for indentation ,shortcut key for indentation in python ,shortcut for indentation in python ,python indent shortcut ,indentation python shortcut ,python indentationerror expected an indented block if ,python indentationerror expected an indented block notepad++ ,python indentationerror expected an indented block try ,python interpreter indentationerror expected an indented block ,python elif indentationerror expected an indented block ,python return indentationerror expected an indented block ,python comment indentationerror expected an indented block ,error in python indentationerror expected an indented block ,how to fix expected an indented block in python ,python function indentationerror expected an indented block ,indentationerror expected an indented block in python ,python expected an indented block ,python print indentationerror expected an indented block ,python console indentationerror expected an indented block ,python class indentationerror expected an indented block ,python command line indentationerror expected an indented block ,python csv indentationerror expected an indented block ,python def indentationerror expected an indented block ,python indentationerror expected an indented block deutsch ,python error indentationerror expected an indented block ,erreur python indentationerror expected an indented block ,que significa en python indentationerror expected an indented block ,indentationerror expected an indented block python español ,erro python indentationerror expected an indented block ,how to fix indentationerror expected an indented block in python ,python fehler indentationerror expected an indented block ,python error expected an indented block ,how to remove indentationerror expected an indented block in python ,indentationerror expected an indented block in python for loop ,indentationerror expected an indented block in python script ,indentationerror expected an indented block meaning in python ,how to solve indentationerror expected an indented block ,python while loop indentationerror expected an indented block ,python indentationerror expected an indented block main ,python indentationerror expected an indented block print ,indentationerror expected an indented block print python 3 ,raspberry pi python indentationerror expected an indented block ,indentationerror expected an indented block python shell ,python sorry indentationerror expected an indented block ,python script indentationerror expected an indented block ,python if statement indentationerror expected an indented block ,python indentation how to ,python indentation tool ,python indentation to spaces ,python indentation to ,python how to fix indentation error ,python how to check indentation ,python how to fix indentation ,python how to create indentation ,python indentation annoying ,python indentation automatic ,python indentation atom ,python indentation and spacing ,python indentation alternative ,python indentation arguments ,python indentation after while loop ,python indentation antlr ,python indentation best practice ,python indentation block ,python indentation brackets ,python indentation blank line ,python indentation broken ,python indentation button ,,python indented block error ,python indent block of code ,python indentation checker ,python indentation check ,python indentation codeforces ,python indentation convention ,python indentation contains tabs ,python indentation command line ,python indentation correction ,python indentation contains mixed spaces and tabs ,python indentation does not match ,python indentation definition ,python indentation docs ,python indentation delete ,python indentation disable ,python indentation docstring ,python indentation error def ,indentation python docx ,python indentation error ,python indentation error fix ,python indentation error check online ,python indentation example ,python indentation error unindent ,python indentation explained ,python indentation editor online ,python indentation error notepad++ ,python indentation fixer ,python indentation formatter ,python indentation fix ,python indentation for loop ,python indentation function arguments ,python indentation function ,python indentation for if else ,python indentation for ,python indentation guide ,python indentation grammar ,python indentation geany ,vim indent python ,how to give indentation in python ,python indentation hell ,python indentation helper ,python indentation haskell ,python indent html ,python indent hotkey ,python indentation in hindi ,python indentation error handling ,indentation python help ,python indentation is not a multiple of four ,python indentation in vim ,python indentation if statement ,python indentation if else ,python indentation in notepad++ ,python indentation in visual studio code ,python indentation issues ,python indentation in sublime ,python indentation js ,python indented text to json ,python indent json ,python indent json command line ,indentation python jupyter ,python indent to left ,python indentation level ,python indentation long lines ,python indentation line break ,python indentation length ,python indentation line ,python indent long if statement ,python indent list comprehension ,python indentation how many spaces ,python indentation multiple lines ,python indentation meaning ,python indentation meme ,python indentation matters ,,python indentation multiline string ,how to make indentation in python ,python indentation notepad++ ,python indentation number of spaces ,python indentation not working ,python indentation new line ,python indentation nested ,python indentation number ,python indent no ,python indentation online ,python indentation of ,python indent output ,python-indent-offset ,python-indent-offset spacemacs ,python indentation 2 or 4 spaces ,python indentation tab or space ,python indentation problem ,python indentation pep8 ,python indentation print ,python indentation pycharm ,python indentation purpose ,python indent plugin notepad++ ,python indent paragraph ,indentation python programming ,python indentation rules ,python indentation rules pdf ,python indentation reddit ,python indentation return ,python indentation recommendation ,python indentation remove ,python indentation range ,python indentation right ,python indentation shortcut ,python indentation space or tab ,python indentation sublime text 3 ,python indentation size ,python indentation syntax ,python indentation syntax error ,python indentation spaces vs tabs ,python indentation tutorial ,python indentation tab vs space ,python indentation tab ,python indentation try except ,python indentation tutorialspoint ,python indentation using ,python indent unindent ,python indent unexpected ,python indentationerror unexpected unindent ,python indentation vim ,python indentation vscode ,python indentation validation ,python indentation validation online ,python indentation vs braces ,python indentation visual studio ,python indentation variable scope ,python indentation vs spaces ,python indentation w3schools ,python indentation while loop ,python indentation windows linux ,python indentation width ,python indentation with 2 spaces ,python indentation wrong ,python indentation working ,python indent whole block ,python indentation in xcode ,python formatter tool ,python fix indentation tool ,python indentation check tool ,indentation tool for python ,python indentation ,python indentation tool online ,python indent online ,python indent spaces or tab ,python indentation 4 spaces ,python indentation 2 spaces ,python indentation four spaces ,python tabs to spaces convert ,python tabs and spaces error ,python mixed indentation spaces found ,python indentation in spaces ,python tabs to spaces online ,python indentation space tab ,python convert tabs to spaces vim ,python tabs vs spaces ,python indent with spaces ,python write indented json to file ,python add indentation to string ,python uses indentation to indicate a block of code ,how to fix indentation error in python using notepad++ ,how to fix indentation error in python online ,python correct indentation errors ,how to fix an indentation error in python ,how to fix indentation error in python ,how to handle indentation error in python ,how to correct indentation error in python ,how to fix unexpected indent error in python ,python check indentation online ,python check indentation in notepad++ ,how to check python indentation error ,python check for indentation ,python check file indentation ,how to check indentation in python ,how to check indentation error in python ,python fix indentation online ,python fix indentation notepad++ ,python fix indentation vscode ,python fix indentation sublime ,python how to fix unexpected indent ,python spyder fix indentation ,python fix all indentation ,how to fix indented block in python ,python fix indentation command line ,how to fix indentation in sublime for python ,how to fix indentation in python ,how to fix python indentation in notepad++ ,how to fix indentation in python spyder ,how to fix indentation in python pycharm ,how to correct indentation in python jupyter notebook ,python fix indentation linux ,python fix mixed indentation ,how to fix indentation problem in python ,python fix indentation script ,how to fix the indentation in python ,python fix indentation vim ,python create indented block ,how to create indentation in python ,vim python automatic indentation ,python editor automatic indentation ,spyder python automatic indentation ,python disable automatic indentation ,python automatic indentation ,


if( aicp_can_see_ads() ) {


if( aicp_can_see_ads() ) {

}

}

Понравилась статья? Поделить с друзьями:
  • Indentationerror unexpected indent ошибка питон
  • Indentationerror unexpected indent как исправить
  • Indentationerror unexpected indent python ошибка
  • Indentationerror expected an indented block python ошибка
  • Indentation error unindent does not match any outer indentation level