Discussion:
Gmoccapy/glade problem
(too old to reply)
Chris Morley
2017-03-04 19:32:08 UTC
Permalink
Raw Message
This is for Norbert.


https://forum.linuxcnc.org/48-gladevcp/32358-where-is-the-glade-hal-widgets-installed-with-linuxcnc-installed-as-a-package?start=10#88999


(mentions 2.7.8 is ok)

Gmoccapy's getiniinfo.py is breaking GLADE loading of gladeVCP widgets.


As getiniinfo has been there a long time, maybe a widget now references it when it didn't before?


This is the error:


Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/op1/linuxcnc-dev/lib/python/gladevcp/__init__.py", line 1, in <module>
from hal_pythonplugin import *
File "/home/op1/linuxcnc-dev/lib/python/gladevcp/hal_pythonplugin.py", line 22, in <module>
from combi_dro import Combi_DRO
File "/home/op1/linuxcnc-dev/lib/python/gladevcp/combi_dro.py", line 28, in <module>
from gmoccapy import getiniinfo
File "/home/op1/linuxcnc-dev/lib/python/gmoccapy/getiniinfo.py", line 30, in <module>
CONFIGPATH = os.environ['CONFIG_DIR']
File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
raise KeyError(key)
KeyError: 'CONFIG_DIR


A quick fix is adding a try: except: around line 30 of getiniinfo.

I'll leave it to you to decide the right fix.

Thanks

Chris M
Niemand Sonst
2017-03-05 17:00:58 UTC
Permalink
Raw Message
Just pushed the correction, all should work again, please advice if you
find more bugs.
Sorry for causingf such problems.

Norbert
Post by Chris Morley
This is for Norbert.
https://forum.linuxcnc.org/48-gladevcp/32358-where-is-the-glade-hal-widgets-installed-with-linuxcnc-installed-as-a-package?start=10#88999
(mentions 2.7.8 is ok)
Gmoccapy's getiniinfo.py is breaking GLADE loading of gladeVCP widgets.
As getiniinfo has been there a long time, maybe a widget now references it when it didn't before?
File "<string>", line 1, in <module>
File "/home/op1/linuxcnc-dev/lib/python/gladevcp/__init__.py", line 1, in <module>
from hal_pythonplugin import *
File "/home/op1/linuxcnc-dev/lib/python/gladevcp/hal_pythonplugin.py", line 22, in <module>
from combi_dro import Combi_DRO
File "/home/op1/linuxcnc-dev/lib/python/gladevcp/combi_dro.py", line 28, in <module>
from gmoccapy import getiniinfo
File "/home/op1/linuxcnc-dev/lib/python/gmoccapy/getiniinfo.py", line 30, in <module>
CONFIGPATH = os.environ['CONFIG_DIR']
File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
raise KeyError(key)
KeyError: 'CONFIG_DIR
A quick fix is adding a try: except: around line 30 of getiniinfo.
I'll leave it to you to decide the right fix.
Thanks
Chris M
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
https://lists.sourceforge.net/lists/listinfo/emc-developers
Loading...