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

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

问题描述

我正在使用jupyter笔记本,它可以正常工作,但是当我按TAB键时,自动完成功能不起作用. 我已经检查了StackOverflow中所有类似的情况,但是没有一个解决方案对我有用. 我还尝试过进行点子升级"到: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\tomer\appdata\local\programs\python\python39\lib\site-packages\ipykernel\kernelbase.py", line 265, in dispatch_shell
    yield gen.maybe_future(handler(stream, idents, msg))
  File "c:\users\tomer\appdata\local\programs\python\python39\lib\site-packages\tornado\gen.py", line 762, in run
    value = future.result()
  File "c:\users\tomer\appdata\local\programs\python\python39\lib\site-packages\tornado\gen.py", line 234, in wrapper
    yielded = ctx_run(next, result)
  File "c:\users\tomer\appdata\local\programs\python\python39\lib\site-packages\ipykernel\kernelbase.py", line 580, in complete_request
    matches = yield gen.maybe_future(self.do_complete(code, cursor_pos))
  File "c:\users\tomer\appdata\local\programs\python\python39\lib\site-packages\ipykernel\ipkernel.py", line 356, in do_complete
    return self._experimental_do_complete(code, cursor_pos)
  File "c:\users\tomer\appdata\local\programs\python\python39\lib\site-packages\ipykernel\ipkernel.py", line 381, in _experimental_do_complete
    completions = list(_rectify_completions(code, raw_completions))
  File "c:\users\tomer\appdata\local\programs\python\python39\lib\site-packages\IPython\core\completer.py", line 484, in rectify_completions
    completions = list(completions)
  File "c:\users\tomer\appdata\local\programs\python\python39\lib\site-packages\IPython\core\completer.py", line 1818, in completions
    for c in self._completions(text, offset, _timeout=self.jedi_compute_type_timeout/1000):
  File "c:\users\tomer\appdata\local\programs\python\python39\lib\site-packages\IPython\core\completer.py", line 1861, in _completions
    matched_text, matches, matches_origin, jedi_matches = self._complete(
  File "c:\users\tomer\appdata\local\programs\python\python39\lib\site-packages\IPython\core\completer.py", line 2029, in _complete
    completions = self._jedi_matches(
  File "c:\users\tomer\appdata\local\programs\python\python39\lib\site-packages\IPython\core\completer.py", line 1373, in _jedi_matches
    interpreter = jedi.Interpreter(
  File "c:\users\tomer\appdata\local\programs\python\python39\lib\site-packages\jedi\api\__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 from @techno1731 is sub-optimal because it just disables jedi rather than fixing the underlying issue.

最新的jedi(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的前两个Google结果中为您提供有关GitHub的相关问题.

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

注意:这是我的回答的副本,它来自在原子中使用氢的巨型IPKernelApp错误问题,该问题的确可能与之无关给定氢/原子设置.现在,我将投票关闭该主题的所有其他问题,以与这个问题重复.

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)中的完成现在可以正常工作(意外的关键字参数"column")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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