Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%pylab inline blows up for single process ipython #3609

Closed
ivanov opened this issue Jul 11, 2013 · 0 comments · Fixed by #3623
Closed

%pylab inline blows up for single process ipython #3609

ivanov opened this issue Jul 11, 2013 · 0 comments · Fixed by #3623
Milestone

Comments

@ivanov
Copy link
Member

ivanov commented Jul 11, 2013

This isn't that big of a deal, since it doesn't necessarily even make sense to have %pylab inline work in a single-process IPython, but thought I'd make a note of it here, so we can keep track of it.

In [1]: pylab inline

Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.kernel.zmq.pylab.backend_inline].
For more information, type 'help(pylab)'.
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-1-550caa57204a> in <module>()
----> 1 get_ipython().magic(u'pylab inline')

/home/pi/code/ipython/IPython/core/interactiveshell.pyc in magic(self, arg_s)
   2180         magic_name, _, magic_arg_s = arg_s.partition(' ')
   2181         magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2182         return self.run_line_magic(magic_name, magic_arg_s)
   2183 
   2184     #-------------------------------------------------------------------------

/home/pi/code/ipython/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
   2101                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
   2102             with self.builtin_trap:
-> 2103                 result = fn(*args,**kwargs)
   2104             return result
   2105 

/home/pi/code/ipython/IPython/core/magics/pylab.pyc in pylab(self, parameter_s)

/home/pi/code/ipython/IPython/core/magic.pyc in <lambda>(f, *a, **k)
    189     # but it's overkill for just that one bit of state.
    190     def magic_deco(arg):
--> 191         call = lambda f, *a, **k: f(*a, **k)
    192 
    193         if callable(arg):

/home/pi/code/ipython/IPython/core/magics/pylab.pyc in pylab(self, parameter_s)
     86             import_all_status = True
     87 
---> 88         self.shell.enable_pylab(parameter_s, import_all=import_all_status, welcome_message=True)

/home/pi/code/ipython/IPython/core/interactiveshell.pyc in enable_pylab(self, gui, import_all, welcome_message)
   2900         # Now we must activate the gui pylab wants to use, and fix %run to take
   2901         # plot updates into account
-> 2902         self.enable_gui(gui)
   2903         self.magics_manager.registry['ExecutionMagics'].default_runner = \
   2904         mpl_runner(self.safe_execfile)

/home/pi/code/ipython/IPython/terminal/interactiveshell.pyc in enable_gui(gui, app)
    305         # Deferred import
    306         from IPython.lib.inputhook import enable_gui as real_enable_gui
--> 307         return real_enable_gui(gui, app)
    308 
    309     def __init__(self, config=None, ipython_dir=None, profile_dir=None,

/home/pi/code/ipython/IPython/lib/inputhook.pyc in enable_gui(gui, app)
    524     except KeyError:
    525         e = "Invalid GUI request %r, valid ones are:%s" % (gui, guis.keys())
--> 526         raise ValueError(e)
    527     return gui_hook(app)
    528 

ValueError: Invalid GUI request u'inline', valid ones are:['osx', 'qt4', 'glut', 'gtk3', 'pyglet', 'wx', 'none', 'qt', 'gtk', 'tk', None]
minrk added a commit to minrk/ipython that referenced this issue Jul 12, 2013
gives clearer, more concise message without traceback

closes ipython#3609
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
gives clearer, more concise message without traceback

closes ipython#3609
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant