Matplotlib-users Digest, Vol 12, Issue 12

Hi All,

I was excited to see that a Qt4 backend is available for matplotlib -
I'm running 0.87.7. So, I installed PyQt4 from source from the
riverbankcomputing website (OSX comes with the Qt framework already
installed), and tried to give it a go.

First off I got the error:

"No module named qt"

So, I went into the Shell.py script in the IPython subdirectory of
site-packages and changed all instances of "import qt" to "from PyQt4
import Qt as qt".

There is already support for the qt4 backend in ipython, you should not have
to make any changes to (recent versions of) ipython.

It fixed the module not found error, but now
I get the following error in Shell.py

"TypeError: too many arguments to QTimer.start(), 1 at most expected"

I realize that this is more likely an error with ipython, but I'm
wondering if anyone else has seen this. If so, have people verified
that ipython (0.80) is indeed compatible with the Qt4Agg backend.

I have been using the qt4 backend with ipython for maybe a year now, currently
ipython 0.8.0. What is the output of "ipython -Version"?

ipython -Version gives:

0.8.0

Specifically, the error seems to be happening on line 838 of Shell.py in the mainloop() function:
...
--> 838 self.timer.start( self.TIMEOUT, True )
...

TypeError: too many arguments to QTimer.start(), 1 at most expected

Thanks,
Aaron

···

On Tuesday 08 May 2007 02:43:45 pm Aaron Hoover wrote:

Is this an unaltered ipython, along with a matplotlib configured to
use Qt4 as its backend? You mentioned having modified ipython
yourself, which is most definitely NOT needed.

I recently used this same ipython with the qt4 backend for several
days without any problem, so your report is rather mysterious...

So, make sure that:

1. You have a fully unmodified ipython.

2. Your matplotlibrc file has the proper backend setting:

backend : Qt4Agg

We should be able to track this down, since we know it works fine for
others (myself and Darren included).

cheers,

f

···

On 5/8/07, Aaron Hoover <ahoover@...1227...> wrote:

> I have been using the qt4 backend with ipython for maybe a year
> now, currently
> ipython 0.8.0. What is the output of "ipython -Version"?

ipython -Version gives:

0.8.0

Specifically, the error seems to be happening on line 838 of Shell.py
in the mainloop() function:
...
--> 838 self.timer.start( self.TIMEOUT, True )
...

TypeError: too many arguments to QTimer.start(), 1 at most expected

Indeed, I just removed my old IPython directory in site-packages and reinstalled - that fixed the problem.

Thanks for all the help.

Aaron

···

On May 8, 2007, at 1:22 PM, Fernando Perez wrote:

On 5/8/07, Aaron Hoover <ahoover@...1227...> wrote:

> I have been using the qt4 backend with ipython for maybe a year
> now, currently
> ipython 0.8.0. What is the output of "ipython -Version"?

ipython -Version gives:

0.8.0

Specifically, the error seems to be happening on line 838 of Shell.py
in the mainloop() function:
...
--> 838 self.timer.start( self.TIMEOUT, True )
...

TypeError: too many arguments to QTimer.start(), 1 at most expected

Is this an unaltered ipython, along with a matplotlib configured to
use Qt4 as its backend? You mentioned having modified ipython
yourself, which is most definitely NOT needed.

I recently used this same ipython with the qt4 backend for several
days without any problem, so your report is rather mysterious...

So, make sure that:

1. You have a fully unmodified ipython.

2. Your matplotlibrc file has the proper backend setting:

backend : Qt4Agg

We should be able to track this down, since we know it works fine for
others (myself and Darren included).