If you look a bit further in the thread you will see that I loaded an 
empty class with no ini stuff or any other contents, just self, halcomp, 
builder, useropts

Not even the shell will load. It would seem that gladevcp has a problem 
with one or all of the loaded objects. So what the errors that you 
pointed out is saying is that even though the script loaded, the objects 
was not instantiated so there is no halcomp or ini handlers to be found.


On 2014-08-28 20:25, Kirk Wallace wrote:
> 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?
>

-- 

Regards /Groete

Marius D. Liebenberg
+27 82 698 3251
+27 12 743 6064
QQ 1767394877


------------------------------------------------------------------------------
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

Reply via email to