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'm having some trouble with Python, again. I created a project using Quickly, and it created a preferences dialog for me. I am now trying to build up the preferences dialog, but I always get some error pointing me at a piece of code Quickly generated itself.

robin@RobinJ:~/Ubuntu One/Python/gtkreddit$ quickly run
/usr/lib/python2.7/dist-packages/gi/overrides/ Warning: g_object_set_property: construct property "type" for object `Window' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)
WARNING:gtkreddit_lib: connect_signals() 'expected handler 'btnRefresh_clicked' in /home/robin/Ubuntu One/Python/gtkreddit/gtkreddit/GtkredditWindow.pyc'
Traceback (most recent call last):
  File "bin/gtkreddit", line 33, in <module>
  File "/home/robin/Ubuntu One/Python/gtkreddit/gtkreddit/", line 33, in main
    window = GtkredditWindow.GtkredditWindow()
  File "/home/robin/Ubuntu One/Python/gtkreddit/gtkreddit_lib/", line 35, in __new__
  File "/home/robin/Ubuntu One/Python/gtkreddit/gtkreddit/", line 50, in finish_initializing
    dlgPreferences = PreferencesDialog ()
  File "/home/robin/Ubuntu One/Python/gtkreddit/gtkreddit_lib/", line 26, in __new__
AttributeError: 'NoneType' object has no attribute 'finish_initializing'

This is the piece it is complaining about;

def finish_initializing(self, builder): # pylint: disable=E1002
    """Set up the preferences dialog"""
    super(PreferencesGtkredditDialog, self).finish_initializing(builder)

The entire code can be found here.

Please assist. I'm pretty new to Python.

share|improve this question
Did you rename your preferences dialog in Glade? – mhall119 Jun 26 '12 at 15:12
@mhall119 Erm... I believe I did. What's the default name again? – RobinJ Jun 26 '12 at 15:21
up vote 1 down vote accepted

The base class for the Preferences dialog is looking for an object named preferences_gtkreddit_dialog, you need to either rename the dialog back to that.

In addition, somehow your PreferencesGtkredditDialog Glade file has been changed to think it is an instance of GtkDialog, where it should be an instance of PreferencesGtkredditDialog.

share|improve this answer
Not fixed yet. – RobinJ Jun 26 '12 at 15:26
Can you push the latest code your your branch on Lanchpad so I can check it again? – mhall119 Jun 26 '12 at 18:50

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.