Bug in 1.3.0: AttributeError: 'NavigationToolbar2TkAgg' object has no attribute 'draw_idle'

Hi,

I’ve just installed matplotlib 1.3.0 and run into the following error when using the “home” button of a figure():

Exception in Tkinter callback

Traceback (most recent call last):

File “C:\Python27\lib\lib-tk\Tkinter.py”, line 1410, in call

return self.func(*args)

File “C:\Python27\lib\site-packages\matplotlib\backend_bases.py”, line 2745, in home

self._update_view()

File “C:\Python27\lib\site-packages\matplotlib\backend_bases.py”, line 3149, in _update_view

self.draw_idle()

AttributeError: ‘NavigationToolbar2TkAgg’ object has no attribute ‘draw_idle’

In fact NavigationToolbar2, inherited by NavigationToolbas2TkAgg, calls draw_idle(), in the update() method, but the definition of draw_idle() is missing, so this seems to be a bug.

Best Regards,

Lorenzo

This is addressed on the master branch via #2319, but the commit where the problem was introduced is not included in 1.3.0, so I am not sure what is going on.

Although, it does look like the fix should be cherry picked to the 1.3.x branch.

···

On Tue, Sep 17, 2013 at 7:02 AM, Lorenzo Di Gregorio <lorenzo.digregorio@…149…> wrote:

Hi,

I’ve just installed matplotlib 1.3.0 and run into the following error when using the “home” button of a figure():

Exception in Tkinter callback

Traceback (most recent call last):

File “C:\Python27\lib\lib-tk\Tkinter.py”, line 1410, in call

return self.func(*args)

File “C:\Python27\lib\site-packages\matplotlib\backend_bases.py”, line 2745, in home

self._update_view()

File “C:\Python27\lib\site-packages\matplotlib\backend_bases.py”, line 3149, in _update_view

self.draw_idle()

AttributeError: ‘NavigationToolbar2TkAgg’ object has no attribute ‘draw_idle’

In fact NavigationToolbar2, inherited by NavigationToolbas2TkAgg, calls draw_idle(), in the update() method, but the definition of draw_idle() is missing, so this seems to be a bug.

Best Regards,

Lorenzo


LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!

1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint

2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes

Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.

http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk


Matplotlib-devel mailing list

Matplotlib-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Thomas A Caswell
PhD Candidate University of Chicago
Nagel and Gardel labs
tcaswell@…1163…

jfi.uchicago.edu/~tcaswell
o: 773.702.7204

Yes, it does appear that the fix needs to be on 1.3.x as well. I'll cherry-pick it.

In the meantime, Lorenzo, you can manually include the fix here:

but this will make it into the 1.3.1 release.

Mike

···

On 09/17/2013 08:36 AM, Thomas A Caswell wrote:

This is addressed on the master branch via #2319, but the commit where the problem was introduced is not included in 1.3.0, so I am not sure what is going on.

Although, it does look like the fix should be cherry picked to the 1.3.x branch.

On Tue, Sep 17, 2013 at 7:02 AM, Lorenzo Di Gregorio > <lorenzo.digregorio@...149... <mailto:lorenzo.digregorio@…149…>> > wrote:

    Hi,

    I've just installed matplotlib 1.3.0 and run into the following
    error when using the "home" button of a figure():

    Exception in Tkinter callback
    Traceback (most recent call last):
      File "C:\Python27\lib\lib-tk\Tkinter.py", line 1410, in __call__
        return self.func(*args)
      File
    "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line
    2745, in home
        self._update_view()
      File
    "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line
    3149, in _update_view
        self.draw_idle()
    AttributeError: 'NavigationToolbar2TkAgg' object has no attribute
    'draw_idle'

    In fact NavigationToolbar2, inherited by NavigationToolbas2TkAgg,
    calls draw_idle(), in the update() method, but the definition of
    draw_idle() is missing, so this seems to be a bug.

    Best Regards,
    Lorenzo

    ------------------------------------------------------------------------------
    LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
    1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
    SharePoint
    2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power
    Pack includes
    Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
    http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
    _______________________________________________
    Matplotlib-devel mailing list
    Matplotlib-devel@lists.sourceforge.net
    <mailto:Matplotlib-devel@lists.sourceforge.net>
    matplotlib-devel List Signup and Options

--
Thomas A Caswell
PhD Candidate University of Chicago
Nagel and Gardel labs
tcaswell@...1038... <mailto:tcaswell@…1038…>
jfi.uchicago.edu/~tcaswell <http://jfi.uchicago.edu/~tcaswell&gt;
o: 773.702.7204

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options

--
                    _

\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _
>>(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | |