Python中常出现TabError: inconsistent use of tabs and spaces in indentation错误解决方法(spyder ide)

TabError: inconsistent use of tabs and spaces in indentation

这个错误目前笔者在Subline3遇到的都是看似空格实则没有空格引起的::

解决方法:就是打开subline的空格制表显示就可以清楚的显示出自己是否真的空格了。

首先说一下参考博客中的解决方案,(ide是subline):
Python中常出现TabError: inconsistent use of tabs and spaces in indentation错误解决方法(spyder ide)
上面的1方框中显示横线就表示真实空格了

而下面的2方框中的方法,看似空格了,实际上并没有空格成功,这通过subline的空格制表显示一下就可以看出来。

Subline3显示空格制表符的设置方法:
Python中常出现TabError: inconsistent use of tabs and spaces in indentation错误解决方法(spyder ide)
首先附上spyder打开空格制符表的方式
Python中常出现TabError: inconsistent use of tabs and spaces in indentation错误解决方法(spyder ide)

然而当我打开spyder中的空格制符表之后发现编辑好的脚本中并没有如1方框中的横线,只有如2方框的点
Python中常出现TabError: inconsistent use of tabs and spaces in indentation错误解决方法(spyder ide)
在我编译通过的脚本中同样也是点,并没有发现横线。而我报错地方的空格制符表显示的是箭头,当我将箭头改为点后,报错成功解决。
Python中常出现TabError: inconsistent use of tabs and spaces in indentation错误解决方法(spyder ide)
参考链接:
第一段代码
George