Re: [Gtk-osx-users] Trouble loading images with gtk-osx ('Couldn't recognize the image file format for file')



On Sep 23, 2009, at 11:28 PM, John Pye wrote:

> Hi all
>
> I am getting closer with my porting of ASCEND to Mac OS X, just  
> seeing a
> strange error here at the moment, I wonder if anyone else has seen  
> this
> or has any suggestions.
>
> When I double-click my "app" icon, I get this error in the Console  
> error
> log:
>
> 24/09/09 4:21:47 PM [0x0-0x8f08f].edu.cmu.cheme.ascend[3877]
> (ascend:3877): libglade-WARNING **: Error loading image: Couldn't
> recognize the image file format for file
> '/Users/john/ascinst/Applications/ASCEND.app/Contents/Resources/ 
> glade/unlocked.png'
>
> 24/09/09 4:21:47 PM [0x0-0x8f08f].edu.cmu.cheme.ascend[3877]
> (ascend:3877): libglade-WARNING **: could not convert string to type
> `GdkPixbuf' for property `pixbuf'
> 24/09/09 4:21:47 PM [0x0-0x8f08f].edu.cmu.cheme.ascend[3877]
> (ascend:3877): libglade-WARNING **: Error loading image: Couldn't
> recognize the image file format for file
> '/Users/john/ascinst/Applications/ASCEND.app/Contents/Resources/ 
> glade/incidence.png'
>
>
> However, if I open the app from a terminal, as follows:
>
> john-pyes-mac-mini:~ john$ open -a ~/ascinst/Applications/ASCEND.app
> john-pyes-mac-mini:~ john$ open -a Console
>
> Then I don't get this error, and the above images all load just fine.
>
> Is there some problem with absolute file paths in the following  
> PyGTK code?
>
> self 
> .fixedimg 
> .set_from_file(os.path.join(self.options.assets_dir,'locked.png'))
>
> Any suggestions would be much appreciated.
>

When you run "open foo.app" from the command line, your shell  
environment is passed in to the application; when you double-click in  
Finder, a default environment is passed in, modified by ~/.MacOS/ 
environment.sh.

Make sure that your startup script sets all the environment variables  
your app needs before exec-ing your program.

Regards,
John Ralls




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]