|
From: matthew a. <ma...@ca...> - 2004-11-09 12:14:22
|
Thanks heaps. That made things quiet once more.
While I was in there I noticed the stanza at the top which includes:
import pygtk
pygtk.require('2.0')
Can I suggest wrapping this with a check for py2exe? Like so:
if not hasattr(sys, 'frozen'):
import pygtk
pygtk.require('2.0')
This is because pygtk.require does not work with py2exe.
I guess this really a bug in pygtk. But since it is a show stopper at
deployment time (as I discovered), I suggest it is important enough to
provide this work around in matplotlib.
Cheers,
Matthew.
Steve Chaplin wrote:
> On Tue, 2004-11-09 at 12:24,
> mat...@li... wrote:
>
>>Hi,
>>
>>I keep getting this error when my matplotlib gtk app starts up:
>>
>>Could not load matplotlib icon: Couldn't recognize the image file
>>format
>>for file 'C:\Python23\share\matplotlib\matplotlib.svg'
>>
>>I don't *think* it's my fault. It doesn't seem to do any harm but it's
>>untidy all the same.
>>
>>Any suggestions?
>>
>>Cheers,
>>Matthew.
>
>
> It looks like the problem is happening because your version of GTK does
> include a GDK pixbuf loader for SVG files.
>
> You can disable the message by editing the installed backend_gtk.py
> (or editing the source file
> matplotlib\lib\matplotlib\backends\backend_gtk.py
> and reinstalling)
> and changing
> "verbose.report_error('Could not load matplotlib icon: %s' %
> sys.exc_info()[1])"
> to
> "verbose.report('Could not load matplotlib icon: %s' %
> sys.exc_info()[1])"
> or just "pass".
>
> The fix has also been applied to CVS.
>
> Steve
>
|