Gremlin
- BigJohnT
- Topic Author
- Offline
- Administrator
Less
More
- Posts: 7000
- Thank you received: 1172
10 Dec 2012 22:11 #27517
by BigJohnT
Gremlin was created by BigJohnT
When you use the gremlin gladevcp widget you get a bunch of errors on start up.
Any ideas on how to just use the gremlin.py in a window?
John
Any ideas on how to just use the gremlin.py in a window?
John
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
Less
More
- Posts: 24
- Thank you received: 758
11 Dec 2012 01:37 #27526
by ArcEye
Replied by ArcEye on topic Gremlin
gremlin-run takes command line arguments and requires a running instance of Linuxcnc.
Without either it will abort with errors, is that what you are seeing?
It will run from the command line quite happily when these requirements are met.
I am currently trying to find a way of embedding it inside my Qt GUI, don't want to have to re-implement it if I can avoid it
regards
Without either it will abort with errors, is that what you are seeing?
It will run from the command line quite happily when these requirements are met.
I am currently trying to find a way of embedding it inside my Qt GUI, don't want to have to re-implement it if I can avoid it
regards
Please Log in or Create an account to join the conversation.
- BigJohnT
- Topic Author
- Offline
- Administrator
Less
More
- Posts: 7000
- Thank you received: 1172
11 Dec 2012 02:13 #27527
by BigJohnT
Replied by BigJohnT on topic Gremlin
When I put the GladeVCP gremlin widget into my Glade file and run it I get this error.
So my thought was to try and add gremlin with my python code and see if I get rid of the error.
What command line arguments does gremlin-run take?
Thanks
John
Starting LinuxCNC...
(gui7:18334): GtkGLExt-CRITICAL **: gtk_widget_get_gl_context: assertion `GTK_WIDGET_REALIZED (widget)' failed
(gui7:18334): GtkGLExt-CRITICAL **: gtk_widget_get_gl_window: assertion `GTK_WIDGET_REALIZED (widget)' failed
(gui7:18334): GtkGLExt-CRITICAL **: gtk_widget_get_gl_window: assertion `GTK_WIDGET_REALIZED (widget)' failed
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/gladevcp/hal_gremlin.py", line 66, in <lambda>
self.gstat.connect('file-loaded', lambda w, f: self._load(f))
File "/usr/lib/pymodules/python2.6/rs274/glcanon.py", line 268, in inner
self.deactivate()
File "/usr/lib/pymodules/python2.6/gremlin.py", line 153, in deactivate
gldrawable.gl_end()
AttributeError: 'NoneType' object has no attribute 'gl_end'
So my thought was to try and add gremlin with my python code and see if I get rid of the error.
What command line arguments does gremlin-run take?
Thanks
John
Please Log in or Create an account to join the conversation.
- BigJohnT
- Topic Author
- Offline
- Administrator
Less
More
- Posts: 7000
- Thank you received: 1172
11 Dec 2012 02:23 #27529
by BigJohnT
Replied by BigJohnT on topic Gremlin
Looking at gremlin-run the main class GremlinApp(gtk.Window): looks to take a gtk.window. It can't be a main window so I'm a little confused what to put it into. I searched for sample code where it might be used but found none.
Thanks
John
Thanks
John
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7780
- Thank you received: 2075
11 Dec 2012 02:33 #27530
by cmorley
Replied by cmorley on topic Gremlin
John are you getting those errors even if linuxcnc is running?
I get those error is the GLADe editor if I don't have linuxcnc running.
I don't get them of course when Gscreen is loaded as it load linuxcnc first.
I have been meaning to look into it but of course have not yet...
Chris M
I get those error is the GLADe editor if I don't have linuxcnc running.
I don't get them of course when Gscreen is loaded as it load linuxcnc first.
I have been meaning to look into it but of course have not yet...
Chris M
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
Less
More
- Posts: 24
- Thank you received: 758
11 Dec 2012 03:42 #27533
by ArcEye
I haven't looked at this properly yet, just putting the path to the .ini file got it running, but I need to look at the code to see how to specify the gcode file to plot.
Replied by ArcEye on topic Gremlin
What command line arguments does gremlin-run take?
I haven't looked at this properly yet, just putting the path to the .ini file got it running, but I need to look at the code to see how to specify the gcode file to plot.
Please Log in or Create an account to join the conversation.
- BigJohnT
- Topic Author
- Offline
- Administrator
Less
More
- Posts: 7000
- Thank you received: 1172
11 Dec 2012 03:59 #27535
by BigJohnT
I wonder if the order I have in my file makes a difference? I'll try a few things.
John
Replied by BigJohnT on topic Gremlin
John are you getting those errors even if linuxcnc is running?
I get those error is the GLADe editor if I don't have linuxcnc running.
I don't get them of course when Gscreen is loaded as it load linuxcnc first.
I have been meaning to look into it but of course have not yet...
Chris M
I wonder if the order I have in my file makes a difference? I'll try a few things.
John
Please Log in or Create an account to join the conversation.
- BigJohnT
- Topic Author
- Offline
- Administrator
Less
More
- Posts: 7000
- Thank you received: 1172
11 Dec 2012 08:14 #27549
by BigJohnT
Replied by BigJohnT on topic Gremlin
I still get the error... this is my main class init, I'm assuming the the line self.cnc = linuxcnc loads linuxcnc?
John
# main class
class gui7(object):
def __init__(self, inifile):
self.builder = gtk.Builder()
self.builder.add_from_file(xmlname)
self.builder.connect_signals(self)
self.cnc = linuxcnc
self.notebook = self.builder.get_object('notebook')
self.num_pad = self.builder.get_object('num_pad')
self.np_label = self.builder.get_object('np_label')
self.halcomp = hal.component('gui7')
self.panel = gladevcp.makepins.GladePanel(self.halcomp, xmlname, self.builder, None)
self.halcomp.ready()
self.ini_file = os.environ['INI_FILE_NAME']
self.window = self.builder.get_object('base_window')
self.window.show()
John
Please Log in or Create an account to join the conversation.
- BigJohnT
- Topic Author
- Offline
- Administrator
Less
More
- Posts: 7000
- Thank you received: 1172
11 Dec 2012 08:33 #27551
by BigJohnT
Replied by BigJohnT on topic Gremlin
Running Gscreen I don't see that error so I must have something wrong.
John
John
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7780
- Thank you received: 2075
11 Dec 2012 09:31 #27552
by cmorley
Replied by cmorley on topic Gremlin
No linuxcnc is loaded from a script when you start a config. (that's what I meant by linuxcnc)
the linuxcnc in your program is the python bindings to linuxcnc's status data and functions.
Are you starting this program like a regular config?
If so it may be that Gscreen takes longer to initialize so avoids this error.
It's cause because gremlin is trying to poll linuxcnc and linuxcnc isn't ready yet.
some sort of
try:
except:
in gremlin should fix this
Chris M
the linuxcnc in your program is the python bindings to linuxcnc's status data and functions.
Are you starting this program like a regular config?
If so it may be that Gscreen takes longer to initialize so avoids this error.
It's cause because gremlin is trying to poll linuxcnc and linuxcnc isn't ready yet.
some sort of
try:
except:
in gremlin should fix this
Chris M
Please Log in or Create an account to join the conversation.
Time to create page: 0.193 seconds