[IPython-dev] Incompatible subclass instances of InteractiveShellEmbed

Osborn, Raymond rosborn at anl.gov
Sun Jan 11 17:49:08 EST 2015


Until someone more knowledgeable replies, this is presumably because InteractiveShellEmbed ultimately inherits from SingletonConfigurable, which only allows one instance to be created. There is some code in embed.py, which saves an existing instance, clears it, and allows another to be created:

    saved_shell_instance = InteractiveShell._instance
    if saved_shell_instance is not None:
        cls = type(saved_shell_instance)
        cls.clear_instance()
    shell = InteractiveShellEmbed.instance(**kwargs)

If something like that is not in your current code, perhaps you need to add it.

Ray

On Jan 11, 2015, at 9:37 AM, Darren Dale <dsdale24 at gmail.com<mailto:dsdale24 at gmail.com>> wrote:

Hello,

I'm working on an application with an in-process qt console, following the example at https://github.com/ipython/ipython/blob/master/examples/Embedding/inprocess_qtconsole.py . I would also like to be able to use the `embed` function occassionally for troubleshooting other parts of the application that are unrelated to the in-process qt console. However, calling embed yields an error: "IPython.config.configurable.MultipleInstanceError: Multiple incompatible subclass instances of InteractiveShellEmbed are being created."  I can reproduce this with the inprocess example by adding a call to `embed()` just before the call to `guisupport.start_event_loop_qt4(app)`. Any ideas how to make this work?

Thanks,
Darren
_______________________________________________
IPython-dev mailing list
IPython-dev at scipy.org<mailto:IPython-dev at scipy.org>
http://mail.scipy.org/mailman/listinfo/ipython-dev

--
Ray Osborn, Senior Scientist
Materials Science Division
Argonne National Laboratory
Argonne, IL 60439, USA
Phone: +1 (630) 252-9011
Email: ROsborn at anl.gov<mailto:ROsborn at anl.gov>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150111/803c3fe8/attachment.html>


More information about the IPython-dev mailing list