IndentationError: Unindent does not match any outer indentation level


#1

I’m independently coding a game for a school class in one of the windows of a codecademy course, and I ran into the following error, I can’t quite figure out how to fix it, I would really appreciate some help


#2

sometimes the indent is a bit problematic, just re-indent the line as well as the lines above and below.


#3

Thank you. Does it make a difference if I use spaces or tabs?


#4

Its not that simple, there is hard and soft tabs. I personally prefer soft tabs (using tab key to insert spaces), so yes, there is certainly a difference, see:

https://stackoverflow.com/questions/26350689/what-are-hard-and-soft-tabs

also, i wouldn’t use Codecademy for my own projects, if you do want to use a cloud text-editor/IDE use a tool build for the job (repl.it for example).

ideally you would use an IDE which gives you control over the tabs (soft vs hard), i personally prefer soft tabs (more consistent across editors and platforms)


#5

Okay, thank you very much for your help! I’ll look into downloading IDE and move my project over to there. I really appreciate the help!


#6

You can try spyder:

https://pythonhosted.org/spyder/

i personally haven’t used it, but a text-editor like atom is also an option, and then install plugins


#7

Good to know. I guess I have some research to do into python platforms :joy: