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.
Problem solved by upgrading to PyCharm 2017.1.4.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With