On 08/28/2014 11:12 AM, Marius Liebenberg wrote: > > On 2014-08-28 19:45, Kirk Wallace wrote: >> On 08/28/2014 09:59 AM, Marius Liebenberg wrote: >>> Hi >>> I have posted on the forum but need some help with python and glade please. >>> http://www.linuxcnc.org/index.php/english/forum/48-gladevcp/28290-objects-not-loaded-or-recognized#50399 >>> >> Just a wild guess, but do you have a gears.var file, is it in a place >> that it can be found? > > Yes it is created in place if it is not there. I have taken all the ini > stuff out and still get the error. All I am loading is the a shell with > the class end some hal objects >
The error message: " Traceback (most recent call last): File "./gearselect.py", line 130, in _btn_1_clicked self.ini.save_state(self) AttributeError: GearSelect instance has no attribute 'ini' " makes me think self.ini was not created or can't be seen from the module. It looks like it is created here: " self.ini_filename = 'gears'+'.var' self.ini = IniFile(self.ini_filename, self.defaults, self.builder) self.ini.restore_state(self) " I seems the restore_state would fail if ini was not created so maybe self.ini can not be seen inside: " def _btn_1_clicked(self, Widget): self.gear_state = 1 self.ini.save_state(self) self.halcomp["selected-gear"] = 1 " which I think the error message points to: " File "./gearselect.py", line 130, in _btn_1_clicked self.ini.save_state(self) AttributeError: GearSelect instance has no attribute 'ini' " Anyway that's what I'm think'n. Can you verify "self.ini.restore_state(self)" is working? -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/ ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers