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/Gtk.py:391: 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>
gtkreddit.main()
File "/home/robin/Ubuntu One/Python/gtkreddit/gtkreddit/__init__.py", line 33, in main
window = GtkredditWindow.GtkredditWindow()
File "/home/robin/Ubuntu One/Python/gtkreddit/gtkreddit_lib/Window.py", line 35, in __new__
new_object.finish_initializing(builder)
File "/home/robin/Ubuntu One/Python/gtkreddit/gtkreddit/GtkredditWindow.py", line 50, in finish_initializing
dlgPreferences = PreferencesDialog ()
File "/home/robin/Ubuntu One/Python/gtkreddit/gtkreddit_lib/PreferencesDialog.py", line 26, in __new__
new_object.finish_initializing(builder)
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.
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 ofPreferencesGtkredditDialog
.