PyGObject GtkBuilder


This is my first use of PyGObject. I am trying to port Guake terminal application ( to use PyGObject and I have some problems with getting GtkBuilder working with PyGObject. I am using latest git version of PyGObject.

The error:
Traceback (most recent call last):
File "/home/aleksandar/gnome/root/usr/lib/guake/", line 1384, in <module>
    if not main():
File "/home/aleksandar/gnome/root/usr/lib/guake/", line 1327, in main
    instance = Guake()
File "/home/aleksandar/gnome/root/usr/lib/guake/", line 524, in __init__
    super(Guake, self).__init__(gladefile('guake.ui'))
File "/home/aleksandar/gnome/root/usr/lib/guake/", line 76, in __init__
File "/home/aleksandar/gnome/root/lib/python2.6/site-packages/gtk-2.0/gi/", line 40, in function
    return info.invoke(*args)
TypeError: instance: Must be Gtk.Builder, not Builder

The code where the error occurs:
    def __init__(self, path, callbacks_proxy=None):
        Load a GtkBuilder ui definition file specified by path.
        If callbacks_proxy is specified it will be used as object to
        to connect the signals, otherwise self will be used.
        self.builder = Gtk.Builder()
        self.builder.add_from_file(path) # <<<<< line 76
        if callbacks_proxy:

On top of the file I am importing Gtk with "from gi.repository import Gtk" and I have also tried to import Gdk and GdkPixbuf as shown in the demo from PyGObject repository, but nothing helps.

Does anyone have any clue about the source of this error?


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