spyder: TabError: inconsistent use of tabs and spaces in indentation

Description

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)

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted 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