John Hunter schrieb:
> On Fri, Aug 7, 2009 at 4:10 AM, Bernd Eggink<mono...@sudrala.de> wrote:
> 
>> being a complete newbie, I tried to run the simple_plot example from the
>> website with matplotlib-0.99.0. However, I get the error message:
> 
>> "/usr/lib/python2.6/site-packages/matplotlib/backends/backend_gtk.py",
>> line 443, in __init__
>>     self.window.set_icon_from_file(window_icon)
>> glib.GError: Couldn't recognize the image file format for file
>> '/usr/lib/python2.6/site-packages/matplotlib/mpl-data/images/matplotlib.svg'
>> --------------------------------------------------------------------
>>
>> It works with 0.98.5.3. Is this a bug or could anything be wrong with my
> 
> Christoph, is GTKAgg the default backend in the win32 installers?  It
> should be TkAgg.  Are you creating a setp.cfg when you build your
> installer, as described at
> 
>   http://matplotlib.sourceforge.net/devel/release_guide.html#packaging
> 
> For OSX and the python2.5 win32 binary I build, I use a Makefile to
> create setup.cfg so I don't forget :-)
> 
> Or Bernd, did you explicitly set backend gtk in your matplotlib rc file (
> http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#matplotlib-directory-location).

No. The stack trace shows that GTKAgg is used.

>  Which installer dd you run (exact file name if you still have it)?

I compiled matplotlib from the sources on a Crux system, simply saying

     python setup.py build
     python setup.py install --prefix=/usr --root=$PKG

> Also, I recall that we patched gtk to use the png not the svg icon for
> win32 -- Bernd, what does your sys.platform report::
> 
>   >> import sys
>   >>> sys.platform

Platform is 'linux2', and gtk.pygtk_version is (2, 14, 1).

To get it working, I replaced matplotlib.svg by a link to matplotlib.png 
(which is pretty ugly, though). Maybe the error should be catched and 
the .png image used as a fallback.

Regards,
Bernd

-- 
Bernd Eggink
http://sudrala.de

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to