您的位置:首页 > 其它

IndentationError: unindent does not match any outer indentation level

2016-04-12 17:28 435 查看
在sublime text 2 中写python代码,有时候会遇到这个错误:


IndentationError:
unindent does not match any outer indentation level

此错误一般是由缩进不对导致的,但有时候明明自己的代码缩进没有问题,但就是一直有这个错误,这有可能是代码编辑器的缩进设置有问题导致,可以试试在sublime text中设置:
View
-->
Indentation
-->
Convert
Indentation to Tabs

同时把Convert Indentation to Tabs 同级菜单里的
Indent
Using Spaces
前面的勾取消掉,一般能解决这个问题。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: