notebook: TAB completion does not work in Jupyter Notebook while another cell is running

Normally, TAB completion works fine in jupyter notebook.

However, if there is another cell running (e.g. a long running sub-process) TAB doesn’t do anything until that and any other queued for execution cells won’t finish their course. It does function in other notebooks, but not in other cells of the same notebook that’s “busy”.

To reproduce, run this cell:

import time
time.sleep(30)

then start a new cell, and try to autocomplete (while):

whil

No completion happens.

This behavior slows down the development process, and in a way somewhat defeats the idea of separate cells. As one can type code, but can’t do it efficiently.

Thank you.

jupyter-1.0.0, python-3.6.6 here.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 4
  • Comments: 17 (3 by maintainers)

Commits related to this issue

Most upvoted comments

I have an issue where tab completion doesn’t work full stop. I’ve checked that all cells above have been run, so it should tab complete.

In a cell: import pandas as pd

Separate cell: pd.DataFrame

In theory, you should be able to type pd.Da + [tab] but nothing. Anyone else had a similar issue? This goes for all other methods and attributes as well. pd.DataFrame was just an example.

I found a solution here: Quoting Ramon Martinez: “The issue can be solved by using the following magic which deactivates jedi %config Completer.use_jedi = False” This worked for me. As pointed in one comment, it seems to be a very recent issue, but I don’t know what’s the scenario to reproduce it. I just updated Anaconda to 1.10.0 and I have faced this problem in both Jupyter and Jupyter Lab (6.1.5 and 2.2.6, respectively) on Windows 10 Home Version 10.0.19041 Compilation19041.

In which can this be added to the feature-request list?

i.e. avail partial TAB completion functionality based on local words when the kernel is busy

Thank you!

i knda of solved the issue downgrading jedi to 0.17.2

It’s expected, although we know it’s not ideal. Tab completion works by sending a message to the kernel asking for a list of completions. If the kernel is busy doing something else at the time, it doesn’t reply.