PyCharm Traceback Error

I have no idea what I've done to break things, but after not using PyCharm in a long time I suddenly can't get it to run my test code.

 

I have the latest version of both PyCharm (Community Edition 2018.3.3) and Python (3.9). I did get a weird interpreter error, but when I manually point PyCharm at my Python 3.9 exe file it shows 3.7 in in the interpreter so something really weird is going on.

D:\PycharmProjects\MaidMycorrhizae_Bot\venv\Scripts\python.exe "D:\PyCharm Community Edition 2018.3.3\helpers\pydev\pydevconsole.py" --mode=client --port=57174
Traceback (most recent call last):
File "D:\PyCharm Community Edition 2018.3.3\helpers\pydev\pydevconsole.py", line 33, in <module>
from _pydev_bundle.pydev_console_utils import BaseInterpreterInterface
File "D:\PyCharm Community Edition 2018.3.3\helpers\pydev\_pydev_bundle\pydev_console_utils.py", line 11, in <module>
from _pydevd_bundle import pydevd_thrift
File "D:\PyCharm Community Edition 2018.3.3\helpers\pydev\_pydevd_bundle\pydevd_thrift.py", line 17, in <module>
from pydev_console.protocol import DebugValue, GetArrayResponse, ArrayData, ArrayHeaders, ColHeader, RowHeader, \
File "D:\PyCharm Community Edition 2018.3.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 "D:\PyCharm Community Edition 2018.3.3\helpers\third_party\thriftpy\_shaded_thriftpy\parser\__init__.py", line 29, in load
thrift = parse(path, module_name, include_dirs=include_dirs,
File "D:\PyCharm Community Edition 2018.3.3\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 502, in parse
parser.parse(data)
File "D:\PyCharm Community Edition 2018.3.3\helpers\third_party\thriftpy\_shaded_ply\yacc.py", line 331, in parse
return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
File "D:\PyCharm Community Edition 2018.3.3\helpers\third_party\thriftpy\_shaded_ply\yacc.py", line 1106, in parseopt_notrack
p.callable(pslice)
File "D:\PyCharm Community Edition 2018.3.3\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 212, in p_struct
val = _fill_in_struct(p[1], p[3])
File "D:\PyCharm Community Edition 2018.3.3\helpers\third_party\thriftpy\_shaded_thriftpy\parser\parser.py", line 765, in _fill_in_struct
gen_init(cls, thrift_spec, default_spec)
File "D:\PyCharm Community Edition 2018.3.3\helpers\third_party\thriftpy\_shaded_thriftpy\thrift.py", line 103, in gen_init
cls.__init__ = init_func_generator(default_spec)
File "D:\PyCharm Community Edition 2018.3.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)
Process finished with exit code 1

 

Halp.

3 comments
Comment actions Permalink

Hi, 2018.3.3 is quite outdated and probably won't work with python 3.8 and 3.9 

Please update to the latest version 2020.3.5 and try again.

0
Comment actions Permalink

I'm not sure how to respond to your comment, Andrey, because as I said I downloaded the latest version from the site. Re: https://www.jetbrains.com/pycharm/download/#section=windows

So if there is a more recent version, it's not there.

0
Comment actions Permalink

You've mentioned that you have the latest version, and then mentioned Community Edition 2018.3.3, and the paths in stack trace also point to 2018 version. So I had to make sure you really have the latest version, which is 2021 at the moment.

Could you please completely remove the current PyCharm installation, reinstall the latest version, and provide new stack trace if the issue is still reproduced?

0

Please sign in to leave a comment.