notebook: Autocomplete not working
Installed Python (3.6) via brew, and the notebook (version 5.0.0) via pip3.
When I hit tab, say, after df.
, nothing happens, then, when I manually complete df.head()
, execution queued, and run after ~30 seconds. At the same time, suggestion drop-down menu appears.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 29
- Comments: 84 (8 by maintainers)
Links to this issue
Commits related to this issue
- downgrade ipython to 6.3.1 to fix autocomplete bug see @rabbernat's comments here: https://github.com/jupyter/notebook/issues/2435 — committed to RhodiumGroup/docker_images by delgadom 5 years ago
This is a different issue. It’s essentially this issue: https://github.com/ipython/ipython/issues/12740
As a temporary solution use:
As soon as IPython master is released, we’re fine.
Thank you. Adding the line
c.Completer.use_jedi = False
to the IPython configuration file solved the issue (so it appears that not only terminal completions but also kernel completions use Jedi). For future visitors having the same issue, setting configurable options is explained here.Downgrading from jedi 0.18.0 to 0.17.2 fixed this issue for me in Windows. Just ran “pip install jedi==0.17.2”
Is there a way to turn off autocomplete? It not only slows me down but often also crashes the kernel? And I wonder if I am the only one having this issue on the planet? Thanks.
After an upgrade from 5.x to 7.2 IPython tab completion also fails on some objects in my environment. Currently as workaround using
Completer.use_jedi = False
My (tab) autocomplete intermittently stops working, not sure if this is the same issue — it does not seem to be that it’s simply taking too long, it just never appears (nothing happens after hitting tab), but execution time remains the same. The problem continues until the kernel restarts. It might be related to significant amounts of data in active memory… but I’m not sure.
Any recommendations to further diagnose issue?
disabling Jedi also worked for me. Here is my test case where autocomplete was failing.
when trying to do autocomplete, with jedi disabled I am able to see the properties of Project with tab complete. Without it it just shows none.
starting ipython with
ipython --Completer.use_jedi=False
worked.
Also, adding a function that is called in the init of my class when it is instantiated, works as well
I’m having exact same issue. IPython is v7.1.1 with jedi 0.13.1 It just started happening w/o any particular reason or changes made. Tried to reinstall Jupyter, Python3, removing all global packages and removing project venv, downgrading notebook up to 4.2.3, even tried using JupyterLab but unsuccessfully.
Currently the only partial solution for me (it doesn’t fully solves the issue and tab-auto completion doesn’t auto-complete function parameters) is to use:
%config IPCompleter.greedy=True
{ 'ipython_version': '7.1.1', 'os_name': 'posix', 'platform': 'Linux-4.4.0-134-generic-x86_64-with-Ubuntu-16.04-xenial', 'sys_platform': 'linux', 'sys_version': '3.6.7 (default, Oct 25 2018, 09:16:13) \n[GCC 5.4.0 20160609]' }
Using notebook w/o auto-complete is extremely difficult. Does anyone works on this issue? Because it opened for years. There are some issues of same problem that are marked as solved but nothing fixed. Very frustrating.
@danieljoonlee over on ipython/ipython#10560, there was a bug identified in the conda packages of
jedi
. Apparently conda-forge has a working version of the jedi package. If that doesn’t fix things for you, please file a new issue on IPython with the details.I also had this problem oddly. Completion worked in a venv with jedi=0.17.2 . completion did not work with a new venv using 0.18 downgrading did the trick, this thread was a help.
I had this problem in a conda environment only. Disabling jedi by adding
%config Completer.use_jedi = False
to the JN helped.same issue here! I suspect that, for me, autocompletion in Jupyter stopped working after I updated IPython from 5.3 to 7.2. Curiously enough, Jupyter still autocompletes dictionary keys, but not variables or class members.
I am also now having this problem, particularly with pandas dataframes.
Once I specify a column in a dataframe, autocomplete no longer gives me informative options/attributes. E.g.,
IPython version is 6.4.0 jedi version is 0.12.1
Any help would be appreciated!
I resolved this by upgrading to ipython version 6.2.1.
Ran into this recently and just found this thread, upgrading to
jedi=0.17.2
fixed our tab auto completion bug.I finally found it. The problem is that matplotlib uses the following in its docstring now:
figure : `~matplotlib.figure.Figure`
.In the older version I tested with, matplotlib used
Figure
, which Jedi was able to understand. IMO this is a matplotlib issue. They should probably just use annotations to clear this up (and make it possible for a lot of static analysis tools [including Jedi] to understand the return type).Downgrading jedi as below solved my problem. This issue helped a lot. Thanks.
pip install jedi==0.17.2
@davidhalter Thanks for informing me! I’ve also only started learning Python (my first programing language) since January and this in my first time using Github. It’s awesome to see that people actually try to help you out here. hope I can do the same for others one day. Much Appreciated.
Just to chime in that after updating IPython to 7.2.0 from 7.0.2 (via Anaconda), I also had some objects fail to autocomplete. Setting
Completer.use_jedi = False
fixed the issue.I’ve also had to disable jedi because the completions are too flaky, but I do miss the extra functionality; does anyone (cc @takluyver) have a suggestion for how to track down the issue/come up with a minimal example? Debuggers, etc. don’t seem to work now that IPython is async and I’m not sure how to test this outside of the REPL.
thanks! disabling jedi helped