Strange autocomplete bugs on Ubuntu, depending on space before variable
See original GitHub issueProblem Description
This is a strange behavior that I only experience under Ubuntu: Autocompletion very often doesn’t work if I do not have a space between the function and the next variable i put into it “function(var1.<NoTabCompletionHere>” . Sometimes it seems as this is also the case for variables that follow a comma e.g. “var1,var2.<NoTabCompletionHere” Also from time to time it seems as if the home key is broken in a sense that it doesn’t jump before the 1st but before the 2nd character. This could be something else or these two bugs could be related… I’ve encountered this behavior now on different machines, and different anaconda setups independently.
What steps will reproduce the problem?
The following doesn’t bring up the tab completion on Ubuntu, but it works without any problem on Windows.
import numpy as np
a = np.array([1,2,3])
np.exp(a.<NoTabCompletionHere>
Btw. adding an extra space before the variable name will show up the tab completion correctly:
import numpy as np
a = np.array([1,2,3])
np.exp(<Space>a.<TabCompletionWorksAgain>
Version and main components
- Spyder Version: 3.2.6 (it seems to be a bug that exists for many months & versions by now.)
- Python Version: 3.5.4
- Qt Versions: 5.6.2, PyQt5 5.6 on Linux
Dependencies
pyflakes >=0.6.0 : 1.6.0 (OK)
pycodestyle >=2.3: 2.3.1 (OK)
pygments >=2.0 : 2.2.0 (OK)
pandas >=0.13.1 : 0.21.1 (OK)
numpy >=1.7 : 1.14.1 (OK)
sphinx >=0.6.6 : 1.7.1 (OK)
rope >=0.9.4 : 0.10.7 (OK)
jedi >=0.9.0 : 0.11.1 (OK)
psutil >=0.3 : 5.4.3 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
sympy >=0.7.3 : 1.1.1 (OK)
cython >=0.21 : None (NOK)
qtconsole >=4.2.0: 4.3.1 (OK)
IPython >=4.0 : 6.2.1 (OK)
pylint >=0.25 : 1.8.2 (OK)
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (12 by maintainers)
Ok, luckily I already have various anaconda environments (Ubuntu 16.04) and updating spyder is fast… I did my tests in spyders IPython Console (not the editor) and always get the same error. No space => not Tabcompletion
Extra space => Tabcompletion works

Tested and reproduced with: Spyder 3.2.6 Python 3.5.4 Spyder 3.2.7 Python 3.5.4 Spyder 3.2.7 Python 3.6.4 Qt 5.6.2 PyQt5 5.6 Ipython 6.2.1 Spyder 3.2.6 Python 3.6.4 Qt 5.6.2 PyQt5 5.6 Ipython 6.2.1
I also tried it directly in the iPython console without spyder => there it works:
Thanks Cheryl! Let us know if/when you find a reproducible use case.