Rob Brown-Bayliss wrote: > print "=====================================" > print "Count = " + str(self.check_count) > self.check_count += 1 > print self.wtree.get_widget("label_checkbutton") > print "=====================================" > if self.wtree.get_widget("label_checkbutton").get_active(): > << some code cut>> > > It has been working fine for a very long time, then I upgraded to ubuntu > 9.04, and started getting this error: > > AttributeError: 'NoneType' object has no attribute 'get_active'
It's very likely a case of bug #546802, http://bugzilla.gnome.org/show_bug.cgi?id=546802 A known workaround is to access the dict of the widget, simply using: self.wtree.__dict__ self.wtree.get_widget('label_checkbutton')__dict__ Does anyone know if the latest PyGTK has this bug fixed? We encounter it frequently during in-house development. _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/