jupyter / help

:sparkles: Need some help or have some questions? Please visit our Discourse page.
https://discourse.jupyter.org
291 stars 97 forks source link

Tab completion error #481

Open adamcpovey opened 5 years ago

adamcpovey commented 5 years ago

Since I updated my conda environment today, tab completion in jupyter stopped working. The following error appears in the terminal,

[IPKernelApp] ERROR | Exception in message handler: Traceback (most recent call last): File "/data/conda/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 267, in dispatch_shell yield gen.maybe_future(handler(stream, idents, msg)) File "/data/conda/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run value = future.result() File "/data/conda/lib/python3.6/site-packages/tornado/gen.py", line 326, in wrapper yielded = next(result) File "/data/conda/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 572, in complete_request matches = yield gen.maybe_future(self.do_complete(code, cursor_pos)) File "/data/conda/lib/python3.6/site-packages/ipykernel/ipkernel.py", line 348, in do_complete return self._experimental_do_complete(code, cursor_pos) File "/data/conda/lib/python3.6/site-packages/ipykernel/ipkernel.py", line 373, in _experimental_do_complete completions = list(_rectify_completions(code, raw_completions)) File "/data/conda/lib/python3.6/site-packages/IPython/core/completer.py", line 485, in rectify_completions completions = list(completions) File "/data/conda/lib/python3.6/site-packages/IPython/core/completer.py", line 1809, in completions for c in self._completions(text, offset, _timeout=self.jedi_compute_type_timeout/1000): File "/data/conda/lib/python3.6/site-packages/IPython/core/completer.py", line 1853, in _completions full_text=full_text, cursor_line=cursor_line, cursor_pos=cursor_column) File "/data/conda/lib/python3.6/site-packages/IPython/core/completer.py", line 2020, in _complete cursor_pos, cursor_line, full_text) File "/data/conda/lib/python3.6/site-packages/IPython/core/completer.py", line 1364, in _jedi_matches text[:offset], namespaces, column=cursor_column, line=cursor_line + 1) File "/data/conda/lib/python3.6/site-packages/jedi/api/init.py", line 429, in init super(Interpreter, self).init(source, environment=environment, **kwds) File "/data/conda/lib/python3.6/site-packages/jedi/api/init.py", line 102, in init os.path.dirname(self.path)if path else os.getcwd() File "/data/conda/lib/python3.6/site-packages/jedi/api/project.py", line 181, in get_default_project if _is_django_path(dir): File "/data/conda/lib/python3.6/site-packages/jedi/api/project.py", line 152, in _is_django_path with open(os.path.join(directory, 'manage.py'), 'rb') as f: IsADirectoryError: [Errno 21] Is a directory: '/home/manage.py'

This was tested in a fresh environment I generated by the following,

export PATH=/data/conda:/usr/bin:/usr/local/bin:.
cd /data
$HOME/Miniconda3-latest-Linux-x86_64.sh
< PREFIX=/data/conda
conda install jupyter nb_conda numpy
jupyter notebook

where the script came from here and I'm running jupyter within Chrome 70.0.3538.102 on Ubuntu 12.04 (we hope to be allowed to update in a few months).

In a new notebook, I ran import numpy as np. In a new cell, I typed np. and hit tab, which generated the above error.