From: John H. <jdh...@ac...> - 2004-08-09 17:19:31
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> After upgrading to Matplotlib 0.61, I am getting the Darren> following error: Unable to load image-loading module: Darren> C:\Program Files\Common Darren> Files\GTK\2.0/lib/gtk-2.0/2.2.0/loaders/svg_loader.dll Darren> The path is correct, the file exists, I wonder if the Darren> mixed path seperators is causing trouble? I cant find the Darren> location of this exception in matplotlib to look into it, Darren> where should I look? I'm note getting this error. My guess is that it is coming from the final lines of backend_gtk.py # set icon used when windows are minimized if gtk.pygtk_version >= (2,2,0): basedir = matplotlib.rcParams['datapath'] fname = os.path.join(basedir, 'matplotlib.svg') try: gtk.window_set_default_icon_from_file (fname) except gobject.GError, exc: print >>sys.stderr, exc My win32 pygtk is older than 2.2.0 which may be why I am not seeing it. Would you mind seeing if this is indeed the problem (for starters, just replace the conditional with 'if 0:'. If you get any more insight into the problem, be sure and let me know! Also, Steve, we might be better off here catching *all* exceptions rather than just the gobject error. Darren, would you test to see if this works # set icon used when windows are minimized if gtk.pygtk_version >= (2,2,0): basedir = matplotlib.rcParams['datapath'] fname = os.path.join(basedir, 'matplotlib.svg') try: gtk.window_set_default_icon_from_file (fname) except: print >>sys.stderr, 'Could not load matplotlib icon' FYI C:\Program Files\Common Files\GTK\2.0 # looks like the default registry path /lib/gtk-2.0/2.2.0/loaders/svg_loader.dll # looks like a path from pkgconfig JDH |