pycharm无法使用python3.8连接到控制台

问题描述 投票:5回答:1

我不知道为什么;但由于python 3.8已发布;我无法运行pycharm控制台,它始终处于“正在连接”状态。

我对python 3.7没问题;因为将立即打开控制台。

这里您可以看到我已经尝试过几次运行控制台,但是即使我等了一天,我也知道;它不连接到控制台。但是当我将解释器从python3.8更改为python3.7时,我打开的新控制台都在一秒钟之内就完成了设置。

错误:

C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\pydev\_pydevd_bundle\pydevd_resolver.py:138: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if found.get(name) is not 1:
Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\pydev\pydevconsole.py", line 33, in <module>
    from _pydev_bundle.pydev_console_utils import BaseInterpreterInterface
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\pydev\_pydev_bundle\pydev_console_utils.py", line 11, in <module>
    from _pydevd_bundle import pydevd_thrift
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\pydev\_pydevd_bundle\pydevd_thrift.py", line 17, in <module>
    from pydev_console.protocol import DebugValue, GetArrayResponse, ArrayData, ArrayHeaders, ColHeader, RowHeader, \
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\pydev\pydev_console\protocol.py", line 6, in <module>
    _console_thrift = _shaded_thriftpy.load(os.path.join(os.path.dirname(os.path.realpath(__file__)), "console.thrift"),
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\third_party\thriftpy\_shaded_thriftpy\parser\__init__.py", line 29, in load
    thrift = parse(path, module_name, include_dirs=include_dirs,
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 502, in parse
    parser.parse(data)
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\third_party\thriftpy\_shaded_ply\yacc.py", line 331, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\third_party\thriftpy\_shaded_ply\yacc.py", line 1106, in parseopt_notrack
    p.callable(pslice)
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 212, in p_struct
    val = _fill_in_struct(p[1], p[3])
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 765, in _fill_in_struct
    gen_init(cls, thrift_spec, default_spec)
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\third_party\thriftpy\_shaded_thriftpy\thrift.py", line 103, in gen_init
    cls.__init__ = init_func_generator(default_spec)
  File "C:\Program Files\JetBrains\PyCharm 2019.1.3\helpers\third_party\thriftpy\_shaded_thriftpy\_compat.py", line 102, in init_func_generator
    new_code = types.CodeType(len(varnames),
TypeError: an integer is required (got type bytes)

照片:

<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pbWcudGVjaHBvd2VydXAub3JnLzE5MTIxNy9lcnJvci5wbmcifQ==” alt =“屏幕截图”>

pycharm规格:pycharm专业版2019.1.3

python console pycharm python-3.8
1个回答
0
投票

PyCharm(社区)2019.3上工作正常。

PyCharm发行了ThriftPy [PyPI]: thriftpy(对于当前版本,它是modified v0.3.8),因为它需要用于不同的功能(包括Python控制台)。

Python 3.8附带了一组更改(一个示例为[Python]: PEP 570 -- Python Positional-Only Parameters),需要对许多现有的(3 rd-party)程序包进行更改,以便它们起作用(对于某些他们,仍然有[[WiP)。

显然,

ThriftPy

也需要进行更改,但是自2016年以来就没有进行过维护。JetBrains将其复制(存储在副本中?)保存在其存储库中。无论如何,您所面临的问题已由[GitHub]: JetBrains/intellij-community - PY-36069 Python console support for Python 3.8解决。

[不幸的是,我在JetBrains.YouTrack上找不到问题,所以我没有关于它的任何其他信息(例如,修复它的时间,等等)。我可以告诉您的是([在开始时也提到了它)是

它已在PyCharm(Community)2019.3

中进行了修复。
© www.soinside.com 2019 - 2024. All rights reserved.