Error Starting IPython QtConsole

654 views
Skip to first unread message

Dave Hirschfeld

unread,
Jun 12, 2012, 7:12:36 AM6/12/12
to spyd...@googlegroups.com
Using latest Spyder/IPython the IPython Client window no longer opens when I start Spyder. When I manually open one it seems fine until I try to copy (Ctrl-C) some text in the client window when I get the following error message.

>>> Traceback (most recent call last):
  File "c:\dev\code\ipython\IPython\frontend\qt\console\console_widget.py", line 331, in eventFilter
    return self._event_filter_console_keypress(event)
  File "c:\dev\code\ipython\IPython\frontend\qt\console\frontend_widget.py", line 302, in _event_filter_console_keypress
    return super(FrontendWidget, self)._event_filter_console_keypress(event)
  File "c:\dev\code\ipython\IPython\frontend\qt\console\console_widget.py", line 1029, in _event_filter_console_keypress
    self.copy()
  File "c:\dev\code\ipython\IPython\frontend\qt\console\frontend_widget.py", line 181, in copy
    if self._page_control.hasFocus():
AttributeError: 'NoneType' object has no attribute 'hasFocus'

Not sure if  the bug is on the IPython side there.

When I try to F9 some code in the editor the following error is thrown:

>>> Traceback (most recent call last):
  File "C:\dev\code\spyderlib\spyderlib\spyder.py", line 1584, in execute_python_code_in_external_console
    self.extconsole.execute_python_code(lines)
  File "C:\dev\code\spyderlib\spyderlib\plugins\externalconsole.py", line 586, in execute_python_code
    ipw = self.main.ipyconsole.get_ipython_widget(id(shellwidget))
  File "C:\dev\code\spyderlib\spyderlib\plugins\ipythonconsole.py", line 590, in get_ipython_widget
    raise ValueError, "Unknown kernel widget ID %r" % kernel_widget_id
ValueError: Unknown kernel widget ID 150418896

-Dave



Carlos Córdoba

unread,
Jun 12, 2012, 9:16:28 AM6/12/12
to spyd...@googlegroups.com
Sorry Dave, I'm not seeing something like this but I'm not on Windows. Jed, are you seeing this on your machine?

El 12/06/12 06:12, Dave Hirschfeld escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/PqyDlhM38v4J.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.

Jed Ludlow

unread,
Jun 12, 2012, 10:31:25 AM6/12/12
to spyd...@googlegroups.com
I can't reproduce this on Windows. I'm running IPython 0.13.dev, updated with the master just a few minutes ago.

Matt Anderson

unread,
Jun 12, 2012, 10:32:38 AM6/12/12
to spyd...@googlegroups.com
I can't make this happen either, Windows 64 bit, IPython 0.13dev

Dave Hirschfeld

unread,
Jun 13, 2012, 4:01:28 AM6/13/12
to spyder

On Jun 12, 3:32 pm, Matt Anderson <m...@archangel.com> wrote:
> I can't make this happen either, Windows 64 bit, IPython 0.13dev

>
> On Tue, Jun 12, 2012 at 9:31 AM, Jed Ludlow <jed.lud...@gmail.com> wrote:
> > I can't reproduce this on Windows. I'm running IPython 0.13.dev, updated
> > with the master just a few minutes ago.
>
> > On Tue, Jun 12, 2012 at 7:16 AM, Carlos Córdoba <ccordob...@gmail.com>wrote:
>
> >>  Sorry Dave, I'm not seeing something like this but I'm not on Windows.
> >> Jed, are you seeing this on your machine?
>

Indeed, it proved to be quite a difficult error to track down. After
nuking and re-cloning my ipython & spyder I still had the problem.
next I nuked my .spyder config directory and the problem disappeared.
Re-creating my configuration step by step I found that to see the
problem you have to uncheck the "Use a pager to display additional
text inside the console" checkbox in the IPython Console/Display
dialog.

Hopefully others can now reproduce the issue!

Cheers,
Dave

Matt Anderson

unread,
Jun 13, 2012, 9:43:18 AM6/13/12
to spyd...@googlegroups.com
I still cannot reproduce it.  On the bright side, I like it better without the pager.

Carlos Córdoba

unread,
Jun 13, 2012, 9:46:55 AM6/13/12
to spyd...@googlegroups.com
Thanks Dave for tracking that down. Really great detective work :-) I
can confirm the Ctrl+C issue but not the F9 one with no pager.

I'll see what I can do about it.

Cheers,
Carlos

El 13/06/12 03:01, Dave Hirschfeld escribió:
> On Jun 12, 3:32 pm, Matt Anderson<m...@archangel.com> wrote:
>> I can't make this happen either, Windows 64 bit, IPython 0.13dev
>> On Tue, Jun 12, 2012 at 9:31 AM, Jed Ludlow<jed.lud...@gmail.com> wrote:
>>> I can't reproduce this on Windows. I'm running IPython 0.13.dev, updated
>>> with the master just a few minutes ago.
>>> On Tue, Jun 12, 2012 at 7:16 AM, Carlos Córdoba<ccordob...@gmail.com>wrote:
>>>> Sorry Dave, I'm not seeing something like this but I'm not on Windows.
>>>> Jed, are you seeing this on your machine?
> Indeed, it proved to be quite a difficult error to track down. After
> nuking and re-cloning my ipython& spyder I still had the problem.

Carlos Córdoba

unread,
Jun 13, 2012, 12:09:41 PM6/13/12
to spyd...@googlegroups.com
It was an IPython bug! I already submitted a fix for it here:

https://github.com/ipython/ipython/pull/1950

It would be ugly to support this fix for 0.12 because we'd have to copy
an entire IPython method and modify it with my patch. Maybe we should
only support 0.13+? Matt, Jed, Dave, Pierre, what do you think? There
are other ugly bugs with no pager, e.g. trying to run %guiref in 0.12
will kill completely the console (but not Spyder) I confirmed this was
fixed in 0.13.

Cheers,
Carlos

El 13/06/12 08:46, Carlos Córdoba escribió:

Carlos Córdoba

unread,
Jun 13, 2012, 12:12:44 PM6/13/12
to spyd...@googlegroups.com
I forgot to mention that 0.13 is expected in a month or so.

El 13/06/12 11:09, Carlos Córdoba escribió:

Dave Hirschfeld

unread,
Jun 13, 2012, 12:51:29 PM6/13/12
to spyder

On Jun 13, 5:09 pm, Carlos Córdoba <ccordob...@gmail.com> wrote:
> It was an IPython bug! I already submitted a fix for it here:
>
> https://github.com/ipython/ipython/pull/1950
>
> It would be ugly to support this fix for 0.12 because we'd have to copy
> an entire IPython method and modify it with my patch. Maybe we should
> only support 0.13+? Matt, Jed, Dave, Pierre, what do you think? There
> are other ugly bugs with no pager, e.g. trying to run %guiref in 0.12
> will kill completely the console (but not Spyder) I confirmed this was
> fixed in 0.13.
>
> Cheers,
> Carlos
>
> El 13/06/12 08:46, Carlos Córdoba escribió:
>

>
> > Thanks Dave for tracking that down. Really great detective work :-) I
> > can confirm the Ctrl+C issue but not the F9 one with no pager.
>
> > I'll see what I can do about it.
>
> > Cheers,
> > Carlos
>

I think the other error was something to do with stuff I loaded in an
ipython extension screwing ipython up.
I can't reproduce it now so I think it's safe to ignore unless I can
come up with a reproducible example in future.

I'm happy with IPython 0.13 being the required version for the next
Spyder release. I think
trying to support old IPython versions would place too high a burden
on the developers, but I would say that
running off git as I do! I don't think it's unreasonable to say that
the latest Spyder requires the latest
released IPython though.

Great that you've been able to fix the problem upstream - hopefully it
makes it into the next release!

-Dave

Carlos Córdoba

unread,
Jun 13, 2012, 7:01:12 PM6/13/12
to spyd...@googlegroups.com
It was committed a couple of hours ago and will be in 0.13. I think as
soon as it is released, I'm going to drop support for 0.12, or maybe
before if a couple of other changes I have for 0.13 make it through.

Cheers,
Carlos

El 13/06/12 11:51, Dave Hirschfeld escribió:
Reply all
Reply to author
Forward
0 new messages