TabError: inconsistent use of tabs and spaces in indentation
See original GitHub issueDescription
What steps will reproduce the problem?
I prefer Sypder over a larger IDE to have a lighter tool to try some code. So I am copy-pasting a lot of code from external source, add something, … Too often I get the error message “TabError: inconsistent use of tabs and spaces in indentation”, likely because some code uses spaces other tabs. Manual fixing this is quite cumbersome. The function “fix identation” does help here either.
On top of that when I actually give up and replace tabs with spaces, delete the tab, insert spaces, the “tool tips” pop up for no reason … and if I press the wrong button, I also suddenly have some code in there which I did not want.
Makes this version of Spyder almost unusable …
Versions
- Spyder version: 4.0.0b7
- Python version: 3.8.0+
- Qt version: 5.12.4
- PyQt5 version: 5.12.3
- Operating System: Linux 4.19.79-1-MANJARO
Dependencies
cloudpickle >=0.5.0 : 1.2.2 (OK)
pygments >=2.0 : 2.4.2 (OK)
qtconsole >=4.5.5 : 4.5.5 (OK)
nbconvert >=4.0 : 5.6.1 (OK)
sphinx >=0.6.6 : 2.2.1 (OK)
pylint >=0.25 : 2.4.3 (OK)
psutil >=0.3 : 5.6.3 (OK)
qtawesome >=0.5.7 : 0.6.0 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
zmq >=17 : 18.1.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
numpydoc >=0.6.0 : 0.9.1 (OK)
spyder_kernels >=1.5.0;<2.0.0: 1.6.0 (OK)
qdarkstyle >=2.7 : 2.7 (OK)
atomicwrites >=1.2.0 : 1.3.0 (OK)
diff_match_patch >=20181111 : 20181111 (OK)
watchdog : None (OK)
keyring : None (OK)
pexpect >=4.4.0 : 4.7.0 (OK)
pympler : None (OK)
sympy >=0.7.3 : None (NOK)
cython >=0.21 : None (NOK)
IPython >=4.0 : 7.9.0 (OK)
matplotlib >=2.0.0 : None (NOK)
pandas >=0.13.1 : None (NOK)
numpy >=1.7 : None (NOK)
scipy >=0.17.0 : None (NOK)
pyls >=0.28.2;<0.29.0 : 0.28.3 (OK)
xdg >=0.26 : 0.26 (OK)
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
python - "inconsistent use of tabs and spaces in indentation"
@RocketR: The answer is for Python. If you use tabs only, you get an 8-space indentation, unless you expand tabs to something else...
Read more >TabError inconsistent use of tabs and spaces in indentation
When the code is executed, the “TabError inconsistent use of tabs and spaces in indentation”. This occurs when the code has all the...
Read more >(Python) inconsistent use of tabs and spaces in indentation
The Python "TabError: inconsistent use of tabs and spaces in indentation" occurs when we mix tabs and spaces in the same code block....
Read more >Python: inconsistent use of tabs and spaces in indentation
The Python “TabError: inconsistent use of tabs and spaces in indentation” error is raised when you try to indent code using both spaces...
Read more >[Solved] : Python TabError: inconsistent use of tabs and ...
In Python, TabError is sub class of IndentationError. Python allows code style by using indentation by space or tabs.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this error is so annoying, im not sure why it happens, everytime it happens i have to fix it by opening the code in sublime text–>view–>identation–>convert identation to tabs
same issue here: Ubuntu 18.04 Spyder 4.1.4 Python 3.8.3