AttributeError: 'module' object has no attribute 'CallLater'

Nils Wagner wrote:
>> Nils Wagner wrote:
>>> Hi all,
>>>
>>> I found a new bug
>>>
>>> $HOME=/home/nwagner
>>> matplotlib data path
>>> /usr/lib/python2.4/site-packages/matplotlib/mpl-data
>>> loaded rc file /home/nwagner/matplotlibrc
>>> matplotlib version 0.98.3rc1
>>> verbose.level helpful
>>> interactive is False
>>> units is False
>>> platform is linux2
>>> CONFIGDIR=/home/nwagner/.matplotlib
>>> Using fontManager instance from
>>> /home/nwagner/.matplotlib/fontManager.cache
>>> backend WXAgg version 2.5.3.1
>>>
>>> spy(K_bc)
>>> File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line
>>> 2237, in spy
>>> b = ishold()
>>> File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line
>>> 466, in ishold
>>> return gca().ishold()
>>> File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line
>>> 566, in gca
>>> ax = gcf().gca(**kwargs)
>>> File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line
>>> 270, in gcf
>>> return figure()
>>> File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line
>>> 247, in figure
>>> FigureClass=FigureClass,
>>> File
>>> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wxagg.py",
>>> line 119, in new_figure_manager
>>> frame = FigureFrameWxAgg(num, fig)
>>> File
>>> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py",
>>> line 1332, in __init__
>>> self.canvas = self.get_canvas(fig)
>>> File
>>> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wxagg.py",
>>> line 32, in get_canvas
>>> return FigureCanvasWxAgg(self, -1, fig)
>>> File
>>> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py",
>>> line 734, in __init__
>>> self.idletimer = wx.CallLater(1,self._onDrawIdle)
>>> AttributeError: 'module' object has no attribute 'CallLater'
>>
>> It looks like this was introduced in wxPython 2.7.1:
>> http://mail.python.org/pipermail/python-announce-list/2006-October/005326.html
>>
>>
>> I have changed backend_wx to use the backwards-compatible alias,
>> FutureCall.
>>
>> Eric
>
> Hi Eric,
>
> Thank you very much ! The next problem is the following
>
> Traceback (most recent call last):
> File
> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py",
> line 1094, in _onPaint
> self.draw(drawDC=drawDC)
> File
> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wxagg.py",
> line 64, in draw
> self.gui_repaint(drawDC=drawDC)
> File
> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py",
> line 995, in gui_repaint
> if self.IsShownOnScreen():
> AttributeError: 'FigureCanvasWxAgg' object has no attribute
> 'IsShownOnScreen'
>
> Nils
>

WxPython experts: what version do we require? If it is earlier than
2.8, then it appears we badly need a testing procedure to ensure
compatibility. (A testing procedure for python version compatibility
would be nice, also--has anyone looked into what it would take to set up
and run a buildbot?)

Clearly I'm developing on 2.8, otherwise I wouldn't be introducing
so many issues for older versions. What version do people want
supported?

I presume IsShownOnScreen is another 2.8-specific method, but a Google
search does not immediately turn up this information, and I don't
normally deal with wx, so I have to pass this problem on to someone who
does.

[41233]: IsVisible --> IsShownOnScreen

   http://trac.wxwidgets.org/changeset/41210

The date on this patch is 2006-09-14, so almost two years old.

It seems like the old name is removed, so it is one or the other.

No indication on trac of which release number.

  - Paul

···

On Mon, Jul 28, 2008 at 08:12:50AM -1000, Eric Firing wrote:

> On Sun, 27 Jul 2008 07:19:24 -1000 > > Eric Firing <efiring@...229...> wrote:

For wxagg, we would like to support 2.6.3.2.2 and later (if it is not
too much work) since this is the version in lenny testing. I think
they've had a little trouble For wx native rendering, we must use 2.8
or later (if we are going to support this at all). So if you could
add the IsVisible compatibility layer to wxagg, that would be great.,
this would be ideal

JDH

···

On Mon, Jul 28, 2008 at 2:32 PM, Paul Kienzle <pkienzle@...537...> wrote:

Clearly I'm developing on 2.8, otherwise I wouldn't be introducing
so many issues for older versions. What version do people want
supported?