Search code examples
pythondebuggingconsolepycharm

Error while using Debug Console: DeprecationWarning: The `use_readline` parameter is deprecated and ignored since IPython 6.0


I have an issue with the Pycharm Debug console. Here's what I do step by step: I set a breakpoint somewhere in my code and when it stops at this breakpoint, I open the debug console as described here. This is prompted:

>>> 

Then I try to do something basic like a = 1, but I get this error message (screenshot). As copy-paste:

Traceback (most recent call last):
  File "C:\dev\PyCharm Community Edition 2018.1\helpers\pydev\pydevconsole.py", line 362, in get_interpreter
    interpreterInterface = getattr(__builtin__, 'interpreter')
AttributeError: module 'builtins' has no attribute 'interpreter'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "C:\dev\PyCharm Community Edition 2018.1\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 1443, in do_it
    result = pydevconsole.console_exec(self.thread_id, self.frame_id, self.expression, dbg)
  File "C:\dev\PyCharm Community Edition 2018.1\helpers\pydev\pydevconsole.py", line 467, in console_exec
    need_more =  exec_code(CodeFragment(expression), updated_globals, frame.f_locals, dbg)
  File "C:\dev\PyCharm Community Edition 2018.1\helpers\pydev\pydevconsole.py", line 383, in exec_code
    interpreterInterface = get_interpreter()
  File "C:\dev\PyCharm Community Edition 2018.1\helpers\pydev\pydevconsole.py", line 364, in get_interpreter

When I start doing this for a whole new python file, everything works out well, but instead of the >>> what is prompted is

In[2]: 

Where is the difference coming from and what can I do to use the debug console in the first case?


Solution

  • >>> refers to the Python console while

    In[2]: 
    

    is the IPython console, a kind of console on steroids.

    Sometimes, a strange import can crash one thing and not the other. Maybe you could check on this one.