IPython(jupyter)中的完成现在可以工作(意外的关键字参数“列") [英] Completion in IPython (jupyter) does now work (unexpected keyword argument 'column')

查看:29
本文介绍了IPython(jupyter)中的完成现在可以工作(意外的关键字参数“列")的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 jupyter notebook,它工作正常,但是当我按 TAB 时,自动完成功能不起作用.我已经在 StackOverflow 中检查了所有类似的情况,但没有一个解决方案对我有用.我也尝试过pip升级"to:IPython、IPYKernel、Jedi 和 Tornado,升级工作正常,但问题仍然存在.我在 Firefox、Chrome 和 Edge 中尝试过.当我按 TAB 时,我可以在终端中看到这些错误:

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:users	omerappdatalocalprogramspythonpython39libsite-packagesipykernelkernelbase.py", line 265, in dispatch_shell
    yield gen.maybe_future(handler(stream, idents, msg))
  File "c:users	omerappdatalocalprogramspythonpython39libsite-packages	ornadogen.py", line 762, in run
    value = future.result()
  File "c:users	omerappdatalocalprogramspythonpython39libsite-packages	ornadogen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "c:users	omerappdatalocalprogramspythonpython39libsite-packagesipykernelkernelbase.py", line 580, in complete_request
    matches = yield gen.maybe_future(self.do_complete(code, cursor_pos))
  File "c:users	omerappdatalocalprogramspythonpython39libsite-packagesipykernelipkernel.py", line 356, in do_complete
    return self._experimental_do_complete(code, cursor_pos)
  File "c:users	omerappdatalocalprogramspythonpython39libsite-packagesipykernelipkernel.py", line 381, in _experimental_do_complete
    completions = list(_rectify_completions(code, raw_completions))
  File "c:users	omerappdatalocalprogramspythonpython39libsite-packagesIPythoncorecompleter.py", line 484, in rectify_completions
    completions = list(completions)
  File "c:users	omerappdatalocalprogramspythonpython39libsite-packagesIPythoncorecompleter.py", line 1818, in completions
    for c in self._completions(text, offset, _timeout=self.jedi_compute_type_timeout/1000):
  File "c:users	omerappdatalocalprogramspythonpython39libsite-packagesIPythoncorecompleter.py", line 1861, in _completions
    matched_text, matches, matches_origin, jedi_matches = self._complete(
  File "c:users	omerappdatalocalprogramspythonpython39libsite-packagesIPythoncorecompleter.py", line 2029, in _complete
    completions = self._jedi_matches(
  File "c:users	omerappdatalocalprogramspythonpython39libsite-packagesIPythoncorecompleter.py", line 1373, in _jedi_matches
    interpreter = jedi.Interpreter(
  File "c:users	omerappdatalocalprogramspythonpython39libsite-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

推荐答案

@techno1731 的解决方案是次优的,因为它只是禁用了 jedi 而不是解决潜在问题.

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

最新的绝地 (0.18) 版本与 IPython 7.19 不兼容,请参阅此讨论.IPython:7.20(2020 年 2 月 1 日发布)和 8.0(尚未发布)具有兼容性修复.

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.

此时正确的解决方法是升级IPython:

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'

这将在前两个 Google 结果中为您提供 GitHub 上的相关问题.

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

注意:这是我从 Giant IPKernelApp Error Using Hydrogen in Atom 问题的回答的副本,这确实看起来不相关给定氢/原子设置.我现在将投票结束与该主题相关的所有其他问题,作为该问题的重复问题.

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.

这篇关于IPython(jupyter)中的完成现在可以工作(意外的关键字参数“列")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆