Spyder: Auto-completion is not working

Created on 24 Oct 2015  路  10Comments  路  Source: spyder-ide/spyder

Description

What steps will reproduce the problem?

  1. auto completion of variables or builtin functions is not working with ctrl+space bar


    1. 3.

What is the expected output? What do you see instead?
Auto-completion should perform with Ctrl+space bar

Please provide any additional information below
Kindly help us in auto-completion mode in spyder

Version and main components

  • Spyder Version: 2.3.7
  • Python Version: 2.7.10
  • Qt Versions: 4.8.6, PyQt4 (API v2) 4.10.4 on Windows

    Optional dependencies

pyflakes >=0.5.0   :  1.0.0 (OK)
pep8 >=0.6         :  1.6.2 (OK)
pygments >=1.6     :  2.0.2 (OK)
IPython >=1.0      :  4.0.0 (OK)
zmq >=2.1.11       :  14.7.0 (OK)
qtconsole >=4.0    :  4.1.0 (OK)
pandas >=0.13.1    :  0.16.2 (OK)
sphinx >=0.6.6     :  1.3.1 (OK)
rope >=0.9.2       :  0.10.2 (OK)
jedi >=0.8.1;<0.9.0:  0.9.0 (NOK)
matplotlib >=1.0   :  1.4.3 (OK)
sympy >=0.7.3      :  0.7.6 (OK)
pylint >=0.25      :  None (NOK)

Most helpful comment

Hi all. With jedi 0.8.1 it works well. Try this:
$ sudo pip3 uninstall jedi
$ sudo pip3 install jedi==0.8.1

All 10 comments

I'm having the same issue. In the console I have auto-complete, it isn't present in the editor

What are you trying to complete in the Editor?

Hi all. With jedi 0.8.1 it works well. Try this:
$ sudo pip3 uninstall jedi
$ sudo pip3 install jedi==0.8.1

Hi,

I have the same issue even after having downgraded to jedi 8.1...

Autocompletion works in console, not in editor. eg:

df=pd.DataFrame()
df. does not complete after tab or Ctrl + Space

In the console, it completes after pressing tab.

Greetings,

Marc

Spyder Version: 2.3.7
Python Version 2.7 or 3.4

IPython >=1.0 : 4.0.0 (OK)
jedi >=0.8.1;<0.9.0: 0.8.1 (OK)
matplotlib >=1.0 : 1.4.3 (OK)
pandas >=0.13.1 : 0.17.0 (OK)
pep8 >=0.6 : 1.6.2 (OK)
pyflakes >=0.6.0 : 1.0.0 (OK)
pygments >=1.6 : 2.0.2 (OK)
pylint >=0.25 : 1.4.2 (OK)
qtconsole >=4.0 : 4.1.0 (OK)
rope >=0.9.2 : 0.9.4-1 (OK)
sphinx >=0.6.6 : 1.3.1 (OK)
sympy >=0.7.3 : 0.7.6.1 (OK)
zmq >=2.1.11 : 14.7.0 (OK)

Hmm it works for me. I have:
Spyder: 2.3.7
Python 3.4.3+ 64bits, Qt 4.8.6, PyQt4 (API v2) 4.11.4 on Linux

jedi 0.8.1
matplotlib 1.5.0
pep8 1.6.2
psutil 3.2.2
pyflakes 1.0.0
pygments 2.0.2
pylint 1.3.1
rope 0.10.3
sphinx 1.3.1

Have a look at the attached screenshot:
spyder

thanks for the information. I updated rope to 0.10.3 but still no success. This is an Anaconda installation on Windows 10 64-bit:

sys.version:
'3.4.3 |Anaconda 2.4.0 (64-bit)| (default, Nov 7 2015, 13:21:48) [MSC v.1600 64 bit (AMD64)]'

Can you tell me if you have the same settings in tools->preferences->editor?

clipboard-2

Well I think I do. Please find the image enclosed.
spyder2

Thanks again. I was trying around a little and made some success (Settings are the same like in my previous posts):

what definitively not works:
df=pd.read_pickle('datP')
df. ...will not pop-up

what works:
df=pd.DataFrame()
df. ...will pop-up

numpy stuff very strangely only works once and never again if you cancel the drop-down menu via escape:

arr=np.array([1,2,3])
arr. ... will work for the first time

For now, the behavior just seems to be a little buggy. It is however much better now than with jedi 0.9 and rope<0.10.3. . So for anyone encountering this issue, i would also suggest to upgrade rope and downgrade jedi.

Any further hints will be appreciated.

@knoerk, this is basically a duplicate of issue #2162. Completion doesn't work reliably for objects generated by assignment (like df or arr in your examples).

We're looking to improve that in a future version of Spyder, but there aren't concrete plans just yet :-)

Hi! Sorry, perhaps, it is absolutely how it is intended to work, but for me it is some nuisance related to autocompletion. I write a lot of SQL queries via pandahouse/clickhouse_driver. As in every other case, these queries are in quotation marks. Would it be possible to turn on autocompletion so that after I do """SELECT networkname FROM database""" I could later use autocompletion when I start to write "networkname" word

Was this page helpful?
0 / 5 - 0 ratings