Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am doing the tutorial in the link

When I run the gtk-builder-convert tutorial.xml I get the following error

    Traceback (most recent call last):
    File "/usr/bin/gtk-builder-convert", line 799, in <module>
    File "/usr/bin/gtk-builder-convert", line 787, in main
    File "/usr/bin/gtk-builder-convert", line 162, in parse_file
    File "/usr/bin/gtk-builder-convert", line 234, in _parse
    assert glade_iface, ("Badly formed XML, there is "

    AssertionError: Badly formed XML, there is no <glade-interface> tag.

the glade file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
    <!-- interface-requires gtk+ 3.0 -->
    <object class="GtkWindow" id="window">
        <property name="can_focus">False</property>
        <property name="title" translatable="yes">GTK+ Text Editor</property>
        <signal name="destroy" handler="on_window_destroy" swapped="no"/>

Note: the glade file was generated using Glade 3.14.0 in ubuntu 12.10

share|improve this question
if I manually change the tag <interface> to <glade-interface> in the glade file and then run the command gtk-builder-convert then the xml file is generated. I still would like to know why auto generated tag did not work – Alwin Doss Jan 22 '13 at 12:03

The last time I programmed in Glade/GTK, it didn't require "gtk-builder-convert". The .glade file that glade provides is itself xml file you need. Just program your code as if you already have converted the file to .xml (btw, i'm using glade 3.12.1). As:

#include <gtk/gtk.h>

void on_window_destroy (GtkWidget *object, gpointer user_data) {

int main (int argc, char *argv[]) {
    GtkBuilder *builder;
    GtkWidget *window;

    gtk_init (&argc, &argv);

    builder = gtk_builder_new ();
    gtk_builder_add_from_file (builder, "", NULL);

    window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
    g_signal_connect (window, "destroy", G_CALLBACK (on_window_destroy), NULL);

    gtk_widget_show (window);       
    gtk_main ();

    return 0;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.