Why does gtk-builder-convert crash saying “UnboundLocalError: local variable child referenced before assignment”?
This is a bug (#523932) in which Glade puts a custom property called “use_stock” in GtkImageMenuItems to indicate a stock menu item but does not put any children (such as the child image). This is the default way in which menus are generated in Glade and was not supported by gtk-builder-convert. The bug has been fixed and should not be a problem in the next versions of GTK+. As a workaround for this bug if you have an older version of GTK+, you can see the section titled “Editing the Menu (or Toolbar)” in GTK+ and Glade3 GUI Programming Tutorial – Part 1.