Can't open Pycharm Console and can't upload helpers for remote interpreter (PyCharm 2021.1 and PyCharm 2021.2) Follow
I am unable to open the Python Console tab in PyCharm 2021.2 (same happened in 2021.1 also). The error is:
Error:Console process terminated with error:
Traceback (most recent call last):
File "/root/.pycharm_helpers/pydev/pydevconsole.py", line 33, in <module>
from _pydev_bundle.pydev_console_utils import BaseInterpreterInterface
File "/root/.pycharm_helpers/pydev/_pydev_bundle/pydev_console_utils.py", line 12, in <module>
from _pydevd_bundle import pydevd_thrift
File "/root/.pycharm_helpers/pydev/_pydevd_bundle/pydevd_thrift.py", line 20, in <module>
from pydev_console.pydev_protocol import DebugValue, GetArrayResponse, ArrayData, ArrayHeaders, ColHeader, RowHeader, \
File "/root/.pycharm_helpers/pydev/pydev_console/pydev_protocol.py", line 6, in <module>
_console_thrift = _shaded_thriftpy.load(os.path.join(os.path.dirname(os.path.realpath(__file__)), "console.thrift"),
File "/root/.pycharm_helpers/third_party/thriftpy/_shaded_thriftpy/parser/__init__.py", line 29, in load
thrift = parse(path, module_name, include_dirs=include_dirs,
File "/root/.pycharm_helpers/third_party/thriftpy/_shaded_thriftpy/parser/parser.py", line 475, in parse
parser = yacc.yacc(debug=False, write_tables=0)
File "/root/.pycharm_helpers/third_party/thriftpy/_shaded_ply/yacc.py", line 3256, in yacc
signature = pinfo.signature()
File "/root/.pycharm_helpers/third_party/thriftpy/_shaded_ply/yacc.py", line 2961, in signature
digest = base64.b16encode(sig.digest())
UnboundLocalError: local variable 'sig' referenced before assignment
Seems to be something wrong in .pycharm_helpers.
In addition, and possibly related, I regularly get the following error on the Event Log:
Couldn't upload helpers for remote interpreter: File /Users/<username>/Library/Caches/JetBrains/PyCharm2021.1/remote_sources/293810872/46911889/.pycharm_helpers/packaging_tool.py: /Users/<username>/Library/Caches/JetBrains/PyCharm2021.1/remote_sources/293810872/46911889/.pycharm_helpers/packaging_tool.py is not a file or directory
Despite this message, the .pycharm_helpers DO get uploaded to the VM, even after I delete them.
The directory /Users/<username>/Library/Caches/JetBrains/PyCharm2021.1/remote_sources/293810872/46911889/.pycharm_helpers doesn't exist at all locally, even though on the VM, .pycharm_helpers does exist in the home directory. Also, /Users/<username>/Library/Caches/JetBrains/PyCharm2021.1/remote_sources/293810872/46911889/ contains all the other files from the VM home directory (just not .pycharm_helpers).
I have tried the following:
- Invalidate caches
- Delete local caches manually (~/Library/Caches/JetBrains/PyCharm2021.1/)
- Delete ~/.pycharm_helpers on the VM
- Delete and recreate Python interpreter
Please sign in to leave a comment.
do you by chance access your remote server by multi-hop ssh, using .ssh/config ? I have the same issue with 2021.2 (works with 2021.1).
My connection to the remote server does authenticate via .ssh/config.
Note that since I upgraded to 2021.2, it looks like the directory /Users/<username>/Library/Caches/JetBrains/PyCharm2021.2/remote_sources doesn't exist. The other symptoms of the problem remain the same as described above.
Please upload your logs folder zipped from ***Help | Collect logs and Diagnostic Data*** to the FTP
https://uploads.jetbrains.com/ and please let me know the filename.
Upload ID: 2021_08_06_2fvQnajZhYM37x3Q
this is now being worked on in https://youtrack.jetbrains.com/issue/PY-49983