0

I "transfered" a python project from sublime2 to eclipse. Now I got a lot of indentation errors. I tried to us reindent.py script to correct this, but I got an error.

reindent -r /project_root

or

python -m reindent -r /project_root

results in:

IndentationError: unindent does not match any outer indentation level

I would like to reindent recursively.

Thanks in advance.

user937284
  • 2,454
  • 6
  • 25
  • 29
  • If you are running on a system where you can easily install VIM, Alex Martelli's answer in this question is the quickest alternative to reindent that I have found.http://stackoverflow.com/questions/1024435/howto-fix-python-indentation – DeaconDesperado Feb 28 '13 at 19:50

1 Answers1

0

You probably have some tabs and some spaces, it needs to be consistant. If you do not have many files then running python -m tabnanny <file name>.py will help resolve which ones have the issue.

hwatkins
  • 1,416
  • 8
  • 11
  • same thing with tabnanny: Indentation Error: unindent does not match any outer indentation level (, line 40) – user937284 Mar 02 '13 at 13:37