Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
189 views
in Technique[技术] by (71.8m points)

python - Completion in IPython (jupyter) does now work (unexpected keyword argument 'column')

I'm using jupyter notebook, and it works fine, but when I press TAB, the auto-completion doesn't work. I already checked all the similar cases in StackOverflow, but none of the solutions worked for me. I have also tried to do "pip upgrade" to: IPython, IPYKernel, Jedi, and Tornado, the upgrade works fine but the problem is still there. I tried in Firefox, Chrome and Edge. When I press TAB I can see those errors in the terminal:

[IPKernelApp] ERROR | Exception in message handler:
Traceback (most recent call last):
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesipykernelkernelbase.py", line 265, in dispatch_shell
    yield gen.maybe_future(handler(stream, idents, msg))
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesornadogen.py", line 762, in run
    value = future.result()
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesornadogen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesipykernelkernelbase.py", line 580, in complete_request
    matches = yield gen.maybe_future(self.do_complete(code, cursor_pos))
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesipykernelipkernel.py", line 356, in do_complete
    return self._experimental_do_complete(code, cursor_pos)
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesipykernelipkernel.py", line 381, in _experimental_do_complete
    completions = list(_rectify_completions(code, raw_completions))
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesIPythoncorecompleter.py", line 484, in rectify_completions
    completions = list(completions)
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesIPythoncorecompleter.py", line 1818, in completions
    for c in self._completions(text, offset, _timeout=self.jedi_compute_type_timeout/1000):
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesIPythoncorecompleter.py", line 1861, in _completions
    matched_text, matches, matches_origin, jedi_matches = self._complete(
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesIPythoncorecompleter.py", line 2029, in _complete
    completions = self._jedi_matches(
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesIPythoncorecompleter.py", line 1373, in _jedi_matches
    interpreter = jedi.Interpreter(
  File "c:usersomerappdatalocalprogramspythonpython39libsite-packagesjediapi\__init__.py", line 725, in __init__
    super().__init__(code, environment=environment,
TypeError: __init__() got an unexpected keyword argument 'column'

I'll be glad if someone can help me with this case

question from:https://stackoverflow.com/questions/65843310/completion-in-ipython-jupyter-does-now-work-unexpected-keyword-argument-colu

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The from @techno1731 is sub-optimal because it just disables jedi rather than fixing the underlying issue.

The latest jedi (0.18) release is incompatible with IPython 7.19 see this discussion. IPython: 7.20 (released Feb 1st 2020) and 8.0 (not yet released) have a compatibility fix.

The correct workaround at this time is to upgrade IPython:

pip install -U ipython==7.20

In future you can search for the final two lines of the trackback after removing all path fragments specific to your installation, this is searching for:

     super().__init__(code, environment=environment,
TypeError: __init__() got an unexpected keyword argument 'column'

This will give you the relevant issues on GitHub in the first two Google result as for today.

Note: this is a copy of my answer from Giant IPKernelApp Error Using Hydrogen in Atom question which indeed can appear unrelated given the Hydrogen/Atom setting. I will now vote to close all other questions on the topic as duplicate of this one.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...