TabError的解決方法
問題:Python檔案執行時報TabError: inconsistent use of tabs and spaces in indentation
原因:說明Python檔案中混有Tab和Space用作格式縮排。這通常是使用外部編輯器編輯Python檔案時,自動採用Tab進行格式縮排。
解決:將Tab轉換成4個Space(通常)或者用Python編輯器(如pyDev)格式化。
在這裡推薦使用Sublime Text 3自動化格式程式碼。
歡迎關注本博主其它文章。
相關文章
- TabError: inconsistent use of tabs and spaces in indentationError
- ArtifactDescriptorException的解決方法Exception
- dns劫持怎麼解決 dns劫持的解決方法DNS
- 遇到問題的解決方法
- 求事務的解決方法
- EXE病毒解決方法
- 金沙不給提款的解決方法
- 跨域的九種解決方法跨域
- pycharm不支援django的解決方法PyCharmDjango
- 解決GitHub打不開的方法Github
- undefined reference to錯誤的解決方法Undefined
- vue命令無效的解決方法Vue
- reCAPTCHA打不開的解決方法APT
- 解決Vue中”This dependency was not found”的方法Vue
- word停止工作的解決方法
- Failed to execute aapt的奇怪解決方法AIAPT
- Stale NFS file handle的解決方法NFS
- 解決Ajax不能跨域的方法跨域
- 解決Oracle死鎖的快捷方法Oracle
- 批量解決oracle鎖等待的方法Oracle
- 禁止ViewState的3種解決方法View
- **PHPNotice:Undefinedindex:…問題的解決方法PHPUndefinedIndex
- PRVF-0002的解決方法
- PHP錯誤“Thisfilehasexpired”的解決方法PHP
- cannot allocate new log 的解決方法
- Google打不開的解決方法Go
- 表空間滿的解決方法
- 解決EXP-00091的方法
- 幾個報錯的解決方法
- get方式傳參的以post方法傳的解決方法
- 指定的網路名不再可用的解決方法
- ORACLE ORA-1652的解決方法Oracle
- localhost拒絕訪問的解決方法localhost
- 依賴衝突時的解決方法
- 視窗被攔截的解決方法
- GoldenGate表異構的解決方法Go
- mongodb密碼特殊字元的解決方法MongoDB密碼字元
- 解決目錄“中毒變exe”的方法