jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.65k stars 4.91k forks source link

Tab completion (regression?) #3333

Open Jessime opened 6 years ago

Jessime commented 6 years ago

I recently upgraded from 5.2.2 to 5.4.0. When I did, I started experiencing issues with my tab completion, particularly when trying to autocomplete paths. For example, if I hit [tab] at the end of a directory name, I no longer see a list of all the files in the directory. I get:

screenshot from 2018-02-12 16-39-49

The files in the directory are listed, but they're buried in a long list of python objects. I haven't messed with this a lot, because I don't really know how to start debugging, but I did try reverting back to 5.2.2, which didn't help.

Also, I upgraded a lot of packages all at once through conda upgrade --all, so this could be a bug resulting from another upgrade. Here's the full output of conda list --revisions:

2018-02-06 11:31:34  (rev 20)
     asn1crypto  {0.23.0 -> 0.24.0}
     bleach  {2.1.1 -> 2.1.2}
     cffi  {1.11.2 -> 1.11.4}
     cytoolz  {0.8.2 -> 0.9.0}
     decorator  {4.1.2 -> 4.2.1}
     html5lib  {0.999999999 -> 1.0.1}
     ipykernel  {4.6.1 -> 4.8.0}
     jedi  {0.11.0 -> 0.11.1}
     jupyter_client  {5.1.0 -> 5.2.2}
     jupyterlab  {0.27.0 -> 0.31.2}
     jupyterlab_launcher  {0.4.0 -> 0.10.2}
     mistune  {0.8.1 -> 0.8.3}
     notebook  {5.2.2 -> 5.4.0}
     numpy  {1.13.3 -> 1.13.3}
     parso  {0.1.0 -> 0.1.1}
     pexpect  {4.3.0 -> 4.3.1}
     python  {3.6.3 -> 3.6.4}
     ruamel_yaml  {0.11.14 -> 0.15.35}
     setuptools  {36.5.0 -> 38.4.0}
     sqlite  {3.20.1 -> 3.22.0}
     terminado  {0.6 -> 0.8.1}
     toolz  {0.8.2 -> 0.9.0}
     tornado  {4.5.2 -> 4.5.3}
    +send2trash-1.4.2

Any thoughts?

mpacer commented 6 years ago

My guess is that this is an IPython or ipykernel issue not a notebook issue since the tab completion machinery lives (I thought) on the kernel side.

@Carreau you'd know this really well, do you have any insight as to what's going wrong?

Given that only ipykernel upgraded and not IPython, my guess is that its ipykernel. Does reverting that fix the bug?

takluyver commented 6 years ago

It's definitely a kernel side issue. We've seen a few similar issues with the changes to the tab completion machinery. Maybe https://github.com/ipython/ipython/pull/10996 ?

Jessime commented 6 years ago

It looks like it's actually exactly the same as https://github.com/ipython/ipython/issues/10961.

Running conda install ipykernel=4.6.1 fixes the problem. Could it be due to https://github.com/ipython/ipykernel/pull/222/files which merged in 4.7?

takluyver commented 6 years ago

Yup, it's quite likely due to that.

guyarad commented 6 years ago

I'm experiencing the same issue. Reverting ipykernel to 4.6.1 didn't help at all. I'm using pip rather than conda. This is my versioning output:

Tue Feb 27 2018 

CPython 2.7.14
IPython 5.5.0

notebook 5.4.0

compiler   : GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38)
system     : Darwin
release    : 17.3.0
machine    : x86_64
processor  : i386
CPU cores  : 8
interpreter: 64bit

It happened quite suddenly, and I suspect it's related to a recent chrome upgrade, since I didn't change anything with my python environment recently.

Ideas?