> File "/home/chris/emc2-dev/lib/python/gremlin.py", line 351, in
> report_gcode_error
> + str(seq) + " of\n" + filename + "\n" + error_str + "\n")
> IOError: [Errno 9] Bad file descriptor
>
> It actually does print the gcode error and file name properly...
> Is this because hal_gremlin needs a bit of a touch - I thought I read that
> somewhere...
>
> Chris M
Chris,
I haven't seen that error on my system, but I'm not using hal_gremlin either.
Error reporting on program load is an odd thing as there's no clever way to
incorporate it into gremlin. Here I just passed the pertinent information
(filename, line number, error type) off to a method that gui writers could
easily subclass. That way you could display the error on a gtk.label or
similar widget.
+ def report_gcode_error(self, result, seq, filename):
+ error_str = gcode.strerror(result)
+ sys.stderr.write("G-Code error in " + os.path.basename(filename) + "\n"
+ "Near line "
+ + str(seq) + " of\n" + filename + "\n" + error_str +
"\n")
+
I don't know why you're seeing that error with hal_gremlin, and later this week
when I have time I'll try to reproduce it (an easy fix would be to simply
remove the offending call to sys.stderr.write, which I put in as a default).
In the meantime, I suggest subclassing the gremlin.report_gcode_error method in
your gscreen.py code and diverting the information to wherever you think it
would be appropriately displayed.
Rogge
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers