gpt4 book ai didi

python-3.x - Pycharm 控制台更新后无法连接

转载 作者:行者123 更新时间:2023-12-04 16:19:01 24 4
gpt4 key购买 nike

我刚刚更新了 Pycharm,除了“Python 控制台”出现以下错误外,一切正常:

"/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevconsole.py" 52830 52831

Traceback (most recent call last):
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevconsole.py", line 526, in <module>
pydevconsole.start_server(host, int(port), int(client_port), client_host)
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevconsole.py", line 347, in start_server
interpreter = InterpreterInterface(client_host, client_port, threading.currentThread())
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console.py", line 24, in __init__
self.interpreter = get_pydev_frontend(host, client_port)
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 461, in get_pydev_frontend
_PyDevFrontEndContainer._instance = _PyDevFrontEnd()
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 310, in __init__
self.ipython = PyDevTerminalInteractiveShell.instance()
File "/Users/kiarash/anaconda/lib/python3.6/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/Users/kiarash/anaconda/lib/python3.6/site-packages/IPython/terminal/interactiveshell.py", line 430, in __init__
super(TerminalInteractiveShell, self).__init__(*args, **kwargs)
File "/Users/kiarash/anaconda/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 516, in __init__
self.init_completer()
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 234, in init_completer
self.Completer = self._new_completer_500()
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 196, in _new_completer_500
parent=self
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py", line 87, in __init__
self.matchers.remove(self.python_matches)
ValueError: list.remove(x): x not in list

Process finished with exit code 1

最佳答案

GitHub 上已提交补丁 ( https://github.com/JetBrains/intellij-community/commit/d9f32f650b5a1f4e7a9646011da415d27e18a210 )

您还可以自己应用补丁,文件路径:

<PyCharm Root>/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py

调整:
     class PyDevIPCompleter(IPCompleter):

def __init__(self, *args, **kwargs):
""" Create a Completer that reuses the advanced completion support of PyDev
in addition to the completion support provided by IPython """
IPCompleter.__init__(self, *args, **kwargs)
# Use PyDev for python matches, see getCompletions below
- self.matchers.remove(self.python_matches)
+ if self.python_matches in self.matchers:
+ # `self.python_matches` matches attributes or global python names
+ self.matchers.remove(self.python_matches)

关于python-3.x - Pycharm 控制台更新后无法连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49628994/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com