TypeError in GtkWindow



Hello guys,

This is my first time posting in this list. My name is Germán, I'm from Argentina (currently living in Brazil) and I'm Astronomer. I use Fedora 22 with Gnome. I did some work with Python and Gtk+ before, but had to learn mostly everything again.

I'm programming an interface to retrieve data from an online astronomical catalog, and I'm programming the main window. I have created a HeaderBar, put a Button and associated a PopOver to that button. The popover contains others buttons, something like this (see TitleBar class, https://gist.github.com/gracca/41a9cf28fa942d924e84#file-q2mass-py).

The other file contains the GtkDialog that will open when clicking the button in the popover (see here, https://gist.github.com/gracca/41a9cf28fa942d924e84#file-opts-py). The problem is that I got the following error when I click that button:

 In [1] run q2MASS.py
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/home/german/Documents/Python/myprogs/q2MASS/q2MASS.py in on_button_coor_clicked(self, widget)
    132         """Close popover and show Coordinates options"""
    133         self.popover_opts.hide()
--> 134         coor = Coor2MASS(self)
    135         resp = coor.run()
    136         if resp == Gtk.ResponseType.OK:

/home/german/Documents/Python/myprogs/q2MASS/opts.py in __init__(self, parent) 22 Gtk.Dialog.__init__(self, "Select columns to retrieve:", parent, 0, 23 (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
---> 24                              Gtk.STOCK_OK, Gtk.ResponseType.OK))
     25         self.set_modal(True)
     26 #        self.set_decorated(False)

/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.pyc in __init__(self, *args, **kwargs)
    535                 new_kwargs['destroy_with_parent'] = True
    536
--> 537         self._init(*args, **new_kwargs)
    538
    539         if add_buttons:

/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyc in new_init(self, *args, **kwargs)
    311                 new_kwargs.pop(key)
    312
--> 313         return super_init_func(self, **new_kwargs)
    314
    315     return new_init

/usr/lib64/python2.7/site-packages/gi/overrides/__init__.pyc in new_init(self, *args, **kwargs)
    311                 new_kwargs.pop(key)
    312
--> 313         return super_init_func(self, **new_kwargs)
    314
    315     return new_init

TypeError: could not convert value for property `transient_for' from instance to GtkWindow

Any help is appreciated, thanks!!
Germán.

--
Germán A. Racca
Fedora Package Maintainer
https://fedoraproject.org/wiki/User:Skytux


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