Inconsistent use of tabs on spaces in indentation error?

Why am I getting this error?

This works

This give me the error on line 123. As far as I can tell there’s no difference between the two.


Do a find/replace in your text editor: find all tabs and replace w/ 4 spaces OR find all 4 spaces and replace w/ tabs.

Python can take 4 spaces to indent or a tab, but not both. Pick one and stick with it :wink:

Finally, it looks like the code under the if statements is indented w/ only 2 spaces: these should be indented with 4 if you are going with spaces, or one tab if you are going with tabs.

BTW it is quite a debate about which to go with so please don’t ask a question like that, but if you want my opinion USE SPACES :wink:

in bl text editor there is an option to convert space and tab

happy bl

Got it working, that seemed to be the issue. The one that worked had 4 spaces on that line and the one that didn’t seemed to have a tab. Python is definitely foreign to me so the little things are confusing, LOL.