Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm's debugging console fails with KeyError: '_sh'

Tags:

pycharm

Whenever I open PyCharm's debug command line during the execution of a program and try to evaluate something, I get the following error:

Traceback (most recent call last):
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2017.1\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 1421, in do_it
    result = pydevconsole.console_exec(self.thread_id, self.frame_id, self.expression, dbg)
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2017.1\helpers\pydev\pydevconsole.py", line 479, in console_exec
    need_more =  exec_code(CodeFragment(expression), updated_globals, frame.f_locals, dbg)
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2017.1\helpers\pydev\pydevconsole.py", line 397, in exec_code
    interpreterInterface.interpreter.update(globals, locals)
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2017.1\helpers\pydev\_pydev_bundle\pydev_ipython_console_011.py", line 334, in update
    locals[ind] = ns[ind]
KeyError: '_sh'

PyCharm's (non-debug) Python Console is working fine though, as well as other aspects of debugging (Debugger's Variables, tooltips, breakpoints and debug steps).

How to get rid of this error? I am using PyCharm Community 2017.1 on Windows 7 with python 3.5.3 provided by Miniconda.

EDIT

Invalidating the cache and restarting does not get rid of the issue.

like image 615
P-Gn Avatar asked Jun 27 '17 09:06

P-Gn


1 Answers

Problem solved by upgrading to PyCharm 2017.1.4.

like image 108
P-Gn Avatar answered Nov 24 '22 09:11

P-Gn