python
syntax_error
official
true
TabError
ID: python/taberror
80%Fix Rate
95%Confidence
0Evidence
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.x | active | — | — | — |
Root Cause
Inconsistent use of tabs and spaces. A line uses tabs when surrounding code uses spaces, or vice versa.
genericOfficial Documentation
https://docs.python.org/3/library/exceptions.htmlWorkarounds
-
90% success Standardize on spaces-only indentation throughout the file
Configure your editor to insert spaces when Tab is pressed