new bug in backend_gtk?

Mike,

When I try to save a file as postscript using the FileChooserDialog with GtkAgg, I get:

efiring@...340...:~/programs/py/mpl/matplotlib_units/examples$ python quadmesh_demo.py
Traceback (most recent call last):
   File "/usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py", line 696, in save_figure
     fname = self.fileselect.get_filename_from_user()
   File "/usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py", line 1095, in get_filename_from_user
     menu_ext = IMAGE_FORMAT[self.cbox.get_active()]
AttributeError: 'FileChooserDialog' object has no attribute 'cbox'

I haven't checked, but I suspect this may be a bug introduced during your recent changes.

Eric

You're right: my bad. Should be fixed in r3461.

Cheers,
Mike

Eric Firing wrote:

···

Mike,

When I try to save a file as postscript using the FileChooserDialog with GtkAgg, I get:

efiring@...340...:~/programs/py/mpl/matplotlib_units/examples$ python quadmesh_demo.py
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py", line 696, in save_figure
    fname = self.fileselect.get_filename_from_user()
  File "/usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py", line 1095, in get_filename_from_user
    menu_ext = IMAGE_FORMAT[self.cbox.get_active()]
AttributeError: 'FileChooserDialog' object has no attribute 'cbox'

I haven't checked, but I suspect this may be a bug introduced during your recent changes.

Eric

Michael Droettboom wrote:

You're right: my bad. Should be fixed in r3461.
  

I meant to type r3484.

···

Cheers,
Mike

Eric Firing wrote:
  

Mike,

When I try to save a file as postscript using the FileChooserDialog with GtkAgg, I get:

efiring@...340...:~/programs/py/mpl/matplotlib_units/examples$ python quadmesh_demo.py
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py", line 696, in save_figure
    fname = self.fileselect.get_filename_from_user()
  File "/usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py", line 1095, in get_filename_from_user
    menu_ext = IMAGE_FORMAT[self.cbox.get_active()]
AttributeError: 'FileChooserDialog' object has no attribute 'cbox'

I haven't checked, but I suspect this may be a bug introduced during your recent changes.

Eric
    
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

The old "classic" toolbar is out of sync with some API updates.
This is what I get when running embedding_in_gtk2.py (after tweaking to use
the classic toolbar)

Traceback (most recent call last):
  File "embedding_in_gtk2.py", line 39, in <module>
    toolbar = NavigationToolbar(canvas, win)
  File "c:\python25\lib\site-packages\matplotlib\backends\backend_gtk.py",
line
746, in __init__
    default_type=self.canvas.get_default_filetype())
TypeError: __init__() got an unexpected keyword argument 'default_type'

and the diffs, after what seemed like the appropriate fixing:

for 0.91.2

0 % diff be_gtk_912.py be_gtk_912-fixd.py
738,739c738,739
< formats=self.canvas.get_supported_filetypes(),
< default_type=self.canvas.get_default_filetype())

···

---

                filetypes=self.canvas.get_supported_filetypes(),
                default_filetype=self.canvas.get_default_filetype())

for 0.98.0

0 % diff be_gtk_980.py be_gtk_980-fixd.py
745,746c745,746
< formats=self.canvas.get_supported_filetypes(),
< default_type=self.canvas.get_default_filetype())
---

                filetypes=self.canvas.get_supported_filetypes(),
                default_filetype=self.canvas.get_default_filetype())

Cheers
Chris Fuller
University of Minnesota

Hey Chris, I made a few changes to restore support for the classic
toolbar in svn. These will come out in the 0.98.1 bug fix release
(what version are you using?) I could port these back to the 0.91
maintenance release, which is also broken but it would take some
additional work. I don't think many people are using this because
noone has complained and it's been broken for a while. If you are on
0.98, drop the attached ticker.py in site/packages/matplotlib and
backend_gtk.py in site-packages/matplotlib/backends/ until the next
bugfix release comes out.

JDH

ticker.py (36.3 KB)

backend_gtk.py (41.4 KB)

···

On Wed, Jun 4, 2008 at 7:11 PM, Chris Fuller <cfuller@...74...> wrote:

The old "classic" toolbar is out of sync with some API updates.
This is what I get when running embedding_in_gtk2.py (after tweaking to use
the classic toolbar)