Problemas con función xml_new_from_buffer usando Glade

Oliver Gutérrez ogutsua en gmail.com
Mie Jul 9 21:08:35 CEST 2008


Hola Arnau:

Si, lo he probado con muchos ficheros más. Todos empezados desde 0 y
editados con el editor glade 2. Las versiones de los paquetes que tengo
ahora mismo son:

ii  python-gtk2                                2.12.1-0ubuntu1
Python bindings for the GTK+ widget set
ii  python-gtkglext1                           1.1.0-3
GtkGLext python bindings
ii  python-gtkhtml2                            2.19.1-0ubuntu7
Python bindings for the GtkHTML2 library
ii  python-gtksourceview2                      2.2.0-0ubuntu2
Python bindings for the GtkSourceView widget
ii  libgtk2-perl                               1:1.161-1
Perl interface to the 2.x series of the Gimp
ii  libgtk2.0-0                                2.12.9-3ubuntu4
The GTK+ graphical user interface library
ii  libgtk2.0-bin                              2.12.9-3ubuntu4
The programs for the GTK+ graphical user int
ii  libgtk2.0-cil                              2.12.0-2ubuntu3
CLI binding for the GTK+ toolkit 2.12
ii  libgtk2.0-common                           2.12.9-3ubuntu4
Common files for the GTK+ graphical user int
ii  libgtk2.0-dev                              2.12.9-3ubuntu4
Development files for the GTK+ library
ii  libgtkglext1                               1.2.0-0ubuntu1
OpenGL Extension to GTK (shared libraries)
ii  libglade2-0                                1:2.6.2-1
library to load .glade files at runtime
ii  libglade2.0-cil                            2.12.0-2ubuntu3
CLI binding for the Glade libraries 2.6
ii  libglademm-2.4-1c2a                        2.6.6-1
C++ wrappers for libglade2 (shared library)



El mié, 09-07-2008 a las 19:09 +0200, Arnau Sanchez escribió:

> Oliver Gutérrez escribió:
> 
> > revil en azazel:~/Eclipse/EVOGTK/src$ python
> > Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) 
> > [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> >>>> import gtk
> >>>> from gtk import glade
> >>>> fd=open('test.glade')
> >>>> buf=fd.read()
> >>>> fd.close()
> >>>> glade.xml_new_from_buffer(buf,len(buf))
> > __main__:1: Warning: g_path_get_dirname: assertion `file_name != NULL'
> > failed
> > __main__:1: GtkWarning: gdk_pixbuf_new_from_file: assertion `filename !=
> > NULL' failed
> > Fallo de segmentación
> 
> Siempre que la he usado, la función xml_new_from_buffer me ha funcionado bien.
> 
> In [16]:import gtk.glade
> In [18]:data = open("grioutil.glade").read()
> In [19]:xml = gtk.glade.xml_new_from_buffer(data, len(data))
> In [20]:xml
> Out[20]:<glade.XML object at 0x877af7c (GladeXML at 0x8587fc8)>
> 
> Así que, o es un bug de la versión que tienes de pygtk (poco probable), o ese 
> fichero glade tiene algún problema. Lo único que se me ocurre es que mandes un 
> enlace del fichero con el que te da el error.
> 
> Por cierto, ¿has probado con algún .glade más?
> 
> arnau
> _______________________________________________
> Lista de correo Python-es 
> http://listas.aditel.org/listinfo/python-es
> FAQ: http://listas.aditel.org/faqpyes
------------ próxima parte ------------
_______________________________________________
Lista de correo Python-es 
http://listas.aditel.org/listinfo/python-es
FAQ: http://listas.aditel.org/faqpyes


Más información sobre la lista de distribución Python-es