-2

After slightly altering an exercise from LP3THW, I started to receive an indentation error when running the script for a second time in Powershell: "TabError: inconsistent use of tabs and spaces in indentation".

I set the editor to show the indents and it does show some space mixed up with tabs, even though I consistently use tabs only when I type. I tried indenting those specific lines several times and it doesn't work (they end up showing as dots, as for space, instead of arrows, as for tab).

Am I doing something wrong...?

(I'm using Python 3.8 in Windows 10)

(lines 9 to 15)

mt_s1
  • 1
  • As the error notes, you're mixing tabs and spaces, which isn't good. Use software like a good IDE that's capable of fixing it the indentation, and set the tab key to emit spaces instead of a tab. – Carcigenicate Jul 13 '20 at 00:17
  • I never got this error until today and I only use tabs. I will try to change this setting and see if it works. Thanks! – mt_s1 Jul 13 '20 at 00:27

1 Answers1

0

EDIT: I consulted the answer in Convert tabs to spaces in Notepad++ in order to change the settings for Tab. Don't know what originated the error in the first place, but the script works now

mt_s1
  • 1