Python 脚本错误:IndentationError: unindent does not match any outer indentation level
生活随笔
收集整理的這篇文章主要介紹了
Python 脚本错误:IndentationError: unindent does not match any outer indentation level
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
好好的Python腳本,確定了每行都已經正確對齊了, 可是運行時還是會遇到提示縮進有誤的問題:IndentationError: unindent does not match any outer indentation level
我使用的是sublime2編輯器,上述問題是由于TAB和空格混用的情況,如圖第38行,其余幾行都是tab格式,而第38行出現了四個點點:
【解決方案】在sublime2 里選擇View->Indentation->勾選Convert Indentation to space(tab),勾選后,將看到所有的縮進統一成了空格或者tab
總結
以上是生活随笔為你收集整理的Python 脚本错误:IndentationError: unindent does not match any outer indentation level的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 论文阅读:Multi-scale ord
- 下一篇: 论文阅读:Deep Filter Ban