Spyder: The code completion in the editor is not working

Created on 24 May 2017  路  17Comments  路  Source: spyder-ide/spyder

Description

What steps will reproduce the problem?

  1. type "import os"
  2. type long_name_for_completion = 1
  3. type long_name, press tab (or control + space), nothing happens.
  4. type os., press tab, nothing happens.

What is the expected output? What do you see instead?
There should be a list of possible variable names for me to choose when I press tab.

Please provide any additional information below
It works in the IPython console, but not the editor.

Actually one hour ago it works well in the editor. Just after a dinner it is not working.
I've tried reinstalling spyder, rebooting, updating the packages, etc. It still doesn't work.

Version and main components

  • Spyder Version: 3.1.4
  • Python Version: 3.6.1
  • Qt Versions: 5.6.2, PyQt5 5.6 on Darwin

Dependencies

pyflakes >=0.6.0 :  1.5.0 (OK)
pep8 >=0.6       :  1.7.0 (OK)
pygments >=2.0   :  2.1.3 (OK)
qtconsole >=4.2.0:  4.2.1 (OK)
nbconvert >=4.0  :  4.2.0 (OK)
pandas >=0.13.1  :  0.20.1 (OK)
numpy >=1.7      :  1.12.1 (OK)
sphinx >=0.6.6   :  1.5.1 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
jedi >=0.9.0     :  0.10.2 (OK)
psutil >=0.3     :  5.0.1 (OK)
matplotlib >=1.0 :  2.0.2 (OK)
sympy >=0.7.3    :  1.0 (OK)
pylint >=0.25    :  1.6.4 (OK)

Duplicate

Most helpful comment

Following issue #5782 for spyder=3.2.6 and python 3.6.3 Anaconda, Windows 8.1 x64:

pip uninstall enum34
restarting spyder

was able to solve my problem with missing autocomplete.

All 17 comments

If you are using Anaconda, please run in a terminal

conda update jedi

and try again.

Thanks for your reply. I've updated it to the latest version but it still not working.

Besides, the object inspector is not working either. When I press cmd+I at an object in the editor, the Help will show nothing. However, if I do the same thing in the IPython Console, it still works.

I have the same problem. I use WinPython. This problem does not exist with Spyder 3.1.3 and jedi 0.9.0 on my computer.

Version and main components

  • Spyder Version: 3.1.4
  • Python Version: 3.5.3
  • Qt Versions: 5.8.0, PyQt5 5.8.1 on Windows

Dependencies

```
pyflakes >=0.6.0 : 1.5.0 (OK)
pep8 >=0.6 : 1.7.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
qtconsole >=4.2.0: 4.3.0 (OK)
nbconvert >=4.0 : 5.1.1 (OK)
pandas >=0.13.1 : 0.20.1 (OK)
numpy >=1.7 : 1.12.1 (OK)
sphinx >=0.6.6 : 1.6.1 (OK)
rope >=0.9.4 : 0.9.4-1 (OK)
jedi >=0.9.0 : 0.10.2 (OK)
matplotlib >=1.0 : 2.0.0 (OK)
sympy >=0.7.3 : 1.0 (OK)
pylint >=0.25 : 1.7.1 (OK)

Let's consolidate this on issue #4410.

@arman00, the problem seems to exclusive to WinPython, at least on Windows.

I am not sure if it is Windows specific or not. FuZhiyu says it happens on MacOS.

@arman00, I'm not saying it's a Windows only issue. What I'm saying is the this problem seems to occur only with WinPython on Windows.

Could you try with Anaconda and report on issue #4410? Thanks!

hum, jedi-dev trunk has about 3 performance patches since jedi-0.10.2. maybe shall we just switch to jedi-dev until jedi-0.10.3 is out

ipython 6 claims for jedi>=0.10. Even jedi0.10.3_trunk_of_2017-05-24 doesn't resolve the issue on Windows/WinPython (make it worth than jedi-0.10.2).

So the choice is between ipython-6.0 (and 6.1 in a few days) or jedi-0.9.0, until problem goes away.

@ccordoba12 , oh I see.. I don't use Anaconda, may try to install it and test if I find time. Thank you!

apparently, the auto-completion works again with ipython-6.1.0 and Spyder-3.2dev

@ccordoba12
here it doesn't work again. I have done nothing. No update and no change of setting. It seems very unstable.

@stonebig
It doesn't work with ipython-6.1.0 and Spyder 3.1.4. Is there a particular reason for Spyder 3.2dev , or do I need to update to this version?

In pure truth, I don't know what improved things:

  • either a practice of waiting 5 minutes after start (until all processes have calm down) before first try,
  • either an update in ipython-6.1 or spyder-3.2dev.

Here is the reference I see on the underlying issue
https://github.com/ipython/ipython/issues/10493#issuecomment-298707763

I just reinstalled anaconda and auto completion working now.

Steps that I followed:

1> Uninstall Anaconda from control panel
2> Restart Computer
3> Download and install anconda from [https://www.anaconda.com/download/#windows]
4> Restart again before it you start anaconda.
5> done.

Dependencies in spyder - 3.2.4 (python 3.6)

IPython >=4.0 : 6.1.0 (OK)
cython >=0.21 : 0.26.1 (OK)
jedi >=0.9.0 : 0.10.2 (OK)
nbconvert >=4.0 : 5.3.1 (OK)
numpy >=1.7 : 1.13.3 (OK)
pandas >=0.13.1 : 0.20.3 (OK)
pycodestyle >=2.3: 2.3.1 (OK)
pyflakes >=0.6.0 : 1.6.0 (OK)
pygments >=2.0 : 2.2.0 (OK)
pylint >=0.25 : 1.7.4 (OK)
qtconsole >=4.2.0: 4.3.1 (OK)
rope >=0.9.4 : 0.10.5 (OK)
sphinx >=0.6.6 : 1.6.3 (OK)
sympy >=0.7.3 : 1.1.1 (OK)

Following issue #5782 for spyder=3.2.6 and python 3.6.3 Anaconda, Windows 8.1 x64:

pip uninstall enum34
restarting spyder

was able to solve my problem with missing autocomplete.

@EonSin Thanks a million for the hint with enum34! I uninstalled it with pip and code completion works perfectly after restarting spyder.

Spyder 3.3.0, Python 3.6.3 Anaconda, Windows 7 x64

Was this page helpful?
0 / 5 - 0 ratings