spyder: Autocomplete not working in editor

Description of your problem

Autocomplete stopped working in the Spyder editor (it worked before, but no longer).

What steps will reproduce the problem?

  1. Fresh install of Spyder and upgrade all dependencies
  2. Reset Spyder to factory settings
  3. Type the following in a new file:

jannie = ‘aaa’ jann

(Followed by CTRL + SPACE to activate autocomplete). Nothing happens. No output in Python console.

Also, no results when attempting auto-complete for built-in modules, functions, etc.

If I go to Consoles -> Open a Python Console and do the same, then autocomplete does work.

I can confirm that CTRL + SPACE also works correctly in the Sublime Text editor.

What is the expected output? What do you see instead?

Expected popup of autocomplete dialog. No popup appeared.

Please provide any additional information below

The following settings are enabled in Preferences -> Editor -> Code Introspection/Analysis:

  • Display balloon tips

  • Automatic code completion

  • Case sensitive code completion

  • Enter key selects completion

  • Link to object definition

  • Real-time code analysis

  • Real-time code style analysis

  • Code annotations

  • Perform analysis when saving file and every 2500 ms

Versions and main components

  • Spyder Version: 3.1.4
  • Python Version: 3.6.0 32bits
  • Qt Version: 5.7.1
  • PyQt Version: PyQt5 5.7.1
  • Operating system: Windows 10

Dependencies

Please go to the menu entry Help > Optional Dependencies (or Help > Dependencies), press the button Copy to clipboard and paste the contents below:

jedi >=0.9.0 : 0.10.2 (OK) matplotlib >=1.0 : None (NOK) nbconvert >=4.0 : 5.2.1 (OK) numpy >=1.7 : None (NOK) pandas >=0.13.1 : None (NOK) pep8 >=0.6 : 1.7.0 (OK) pyflakes >=0.6.0 : 1.5.0 (OK) pygments >=2.0 : 2.2.0 (OK) pylint >=0.25 : 1.7.1 (OK) qtconsole >=4.2.0: 4.3.0 (OK) rope >=0.9.4 : 0.10.5 (OK) sphinx >=0.6.6 : 1.6.2 (OK) sympy >=0.7.3 : 1.0 (OK) autocomplete

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

sad to say but spyder has by far proven to be the most unstable IDE I ever used. Have been trying to fix things around since morning and stuff keeps breaking one after the other. And now I am again trying to look for why autocomplete isn’t working 😦 This is not the first time this issue has happened, seems more like Spyder’s internal decision decides when autocomplete should work and when not depending on the day of the week.

Thanks for reporting. This is a duplicate of issue #4410.

We still don’t know why but autocompletion is working fine for Anaconda users and broken for some users that don’t use it.

So my suggestion is to use Anaconda instead of your own Python installation, if possible.

On my mac, it wasn’t working earlier when I was keeping spyder IDE open and anaconda (its parent window) close. I reopened spyder and this time kept anaconda open as well, and autocomplete started working.

No complications needed.

Cheers

Autocompletion does not work for me either in editor nor in Ipython console. Sometimes it does sometimes not. And it is very slow if it happens to work. spyder 3.2.8

# Name Version Build Channel alabaster 0.7.10 py35h3a808de_0 asn1crypto 0.24.0 py35_0 babel 2.6.0 py35_0 backcall 0.1.0 py35_0 blas 1.0 mkl ca-certificates 2018.03.07 0 certifi 2018.4.16 py35_0 cffi 1.11.5 py35h945400d_0 chardet 3.0.4 py35h177e1b7_1 colorama 0.3.9 py35h32a752f_0 commonmark 0.5.4 py35_0 clinicalgraphics cryptography 2.2.2 py35hfa6e2cd_0 decorator 4.3.0 py35_0 docutils 0.14 py35h8ccb97f_0 icc_rt 2017.0.4 h97af966_0 idna 2.7 py35_0 imagesize 1.0.0 py35_0 intel-openmp 2018.0.3 0 ipython 5.6.0 py35_0 ipython_genutils 0.2.0 py35ha709e79_0 jedi 0.12.0 py35_1 jinja2 2.10 py35hdf652bb_0 markupsafe 1.0 py35hc253e08_1 mkl 2018.0.3 1 mkl_fft 1.0.1 py35h452e1ab_0 mkl_random 1.0.1 py35h9258bd6_0 numpy 1.14.5 py35h9fa60d3_0 numpy-base 1.14.5 py35h5c71026_0 numpydoc 0.8.0 py35_0 openssl 1.0.2o h8ea7d77_0 packaging 17.1 py35_0 pandas 0.23.1 py35h830ac7b_0 parso 0.1.1 py35he39c48a_0 pickleshare 0.7.4 py35h2f9f535_0 pip 10.0.1 py35_0 prompt_toolkit 1.0.15 py35h89c7cb4_0 pycparser 2.18 py35h15a15da_1 pygments 2.2.0 py35h24c0941_0 pyopenssl 18.0.0 py35_0 pyparsing 2.2.0 py35hcabcaab_1 pysocks 1.6.8 py35_0 python 3.5.5 h0c2934d_2 python-dateutil 2.5.0 py35_0 clinicalgraphics pytz 2018.4 py35_0 recommonmark 0.2.0 py35_0 clinicalgraphics requests 2.14.2 py35_0 rope 0.10.7 py35h5756fe0_0 setuptools 39.2.0 py35_0 simplegeneric 0.8.1 py35_2 six 1.11.0 py35hc1da2df_1 snowballstemmer 1.2.1 py35h4c55bfa_0 sphinx 1.7.5 py35_0 sphinx-rtd-theme 0.4.0 <pip> sphinxcontrib 1.0 py35h45f5ca3_1 sphinxcontrib-websupport 1.1.0 py35_1 traitlets 4.3.2 py35h09b975b_0 urllib3 1.14 py35_0 clinicalgraphics vc 14 h0510ff6_3 vs2015_runtime 14.0.25123 3 wcwidth 0.1.7 py35h6e80d8a_0 wheel 0.31.1 py35_0 win_inet_pton 1.0.1 py35hbef1270_1 win_unicode_console 0.5 py35h56988b5_0 wincertstore 0.2 py35hfebbdb8_0

I have solved this issue removing and installing again the “rope” pkg for python.

sudo pip3 install rope

This fixed the issue for me

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)