Jay Graves wrote:

Hello
I wrote a while ago with this problem, but I didn't have my system
configured properly. Now I believe I do, and the problem still exists.

I am running Debian (Sid) with Python2.3 python2.3-gnome2 1.99.13
python2.3-glade2 1.99.13
python2.3-gtk2 1.99.13

I have a glade file that uses gnome widgets. In my python script I import pygtk
pygtk.require('2.0')
import gtk
import gtk.glade
import gnome

running the file produces many errors like the following:
(test:32569): GLib-GObject-WARNING **: invalid cast from (NULL) pointer
to `GObject'

(test:32569): Gnome-CRITICAL **: file gnome-program.c: line 869
(gnome_program_locate_file): assertion `program != NULL' failed

(test:32569): Gtk-CRITICAL **: file gtkaccelmap.c: line 135
(gtk_accel_map_add_entry): assertion `_gtk_accel_path_is_valid
(accel_path)' failed

Am I missing a critical piece?

Yes. If you are using GNOME widgets in your glade interface, you must initialise GNOME. Add the following to the startup of your program:
import gnome.ui
gnome.init('program-name', 'version')

(this initialisation is not done on module load because it can't guess your app's name and version).

James.

--
Email: [EMAIL PROTECTED] | Linux.conf.au http://linux.conf.au/
WWW: http://www.daa.com.au/~james/ | Jan 22-25 Perth, Western Australia.



_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Reply via email to