jupyter_console icon indicating copy to clipboard operation
jupyter_console copied to clipboard

IPDB works in ipython but not in jupyter-console

Open alphaCTzo7G opened this issue 7 years ago • 2 comments

IPDB is a very popular debugger these days.

Not sure whether this is a problem in jupyter console or in ipdb..

but ipdb doesnt work in jupyter-console but works find in ipython.

In [1]: import ipdb
---------------------------------------------------------------------------
MultipleInstanceError                     Traceback (most recent call last)
<ipython-input-1-5aecdc9391ac> in <module>()
----> 1 import ipdb

~/.local/lib/python3.5/site-packages/ipdb/__init__.py in <module>()
      5 # https://opensource.org/licenses/BSD-3-Clause
      6
----> 7 from ipdb.__main__ import set_trace, post_mortem, pm, run             # noqa
      8 from ipdb.__main__ import runcall, runeval, launch_ipdb_on_exception  # noqa
      9

~/.local/lib/python3.5/site-packages/ipdb/__main__.py in <module>()
     60     # the instance method will create a new one without loading the config.
     61     # i.e: if we are in an embed instance we do not want to load the config.
---> 62     ipapp = TerminalIPythonApp.instance()
     63     shell = get_ipython()
     64     def_colors = shell.colors

~/.local/lib/python3.5/site-packages/traitlets/config/configurable.py in instance(cls, *args, **kwargs)
    421             raise MultipleInstanceError(
    422                 'Multiple incompatible subclass instances of '
--> 423                 '%s are being created.' % cls.__name__
    424             )
    425

MultipleInstanceError: Multiple incompatible subclass instances of TerminalIPythonApp are being created.

Have tried it on windows/linux ipython kernels and both on remote and local kernels

https://github.com/gotcha/ipdb/issues/142

alphaCTzo7G avatar Feb 06 '18 18:02 alphaCTzo7G

That's a bit puzzling, because it's definitely been importable in an IPython kernel previously - see e.g. https://github.com/gotcha/ipdb/issues/52 . But it looks like a few other people have reported a similar error: https://github.com/gotcha/ipdb/issues/81

takluyver avatar Feb 07 '18 14:02 takluyver

Should be fixed by https://github.com/gotcha/ipdb/pull/143

takluyver avatar Feb 07 '18 15:02 takluyver