LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.81k stars 1.16k forks source link

Gmoccapy error - combi_dro.py #1398

Closed LJspice closed 2 years ago

LJspice commented 2 years ago

Here are the steps I follow to reproduce the issue:

  1. Install linuxcnc buster preempt-RT 2.8 ISO
  2. Change repo to 2.9/master, update/upgrade
  3. Install missing dependency gnome-icon-theme
  4. Open sim gmoccapy config (Lathe_C.ini, though others do it)
  5. Click spindle on button. Error

This is what I expected to happen:

No error message, spindle shows as on

This is what happened instead:

Error message. After error appears, jog buttons stop working

Traceback (most recent call last):
  File "/usr/bin/gmoccapy", line 2279, in _periodic
    self._update_vc()
  File "/usr/bin/gmoccapy", line 3773, in _update_vc
    diameter = int(self.dro_dic["Combi_DRO_0"].get_position()[1] * 2)
  File "/usr/lib/python3/dist-packages/gladevcp/combi_dro.py", line 633, in get_position
    positions = self._position()
TypeError: _position() missing 5 required positional arguments: 'object', 'p', 'rel_p', 'dtg', and 'joint_actual_position'
Click to expand complete terminal log ``` linuxcnc@lcnc-lathe:~$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster linuxcnc@lcnc-lathe:~$ uname -a Linux lcnc-lathe 4.19.0-18-rt-amd64 #1 SMP PREEMPT RT Debian 4.19.208-1 (2021-09-29) x86_64 GNU/Linux linuxcnc@lcnc-lathe:~$ linuxcnc LINUXCNC - 2.9.0-pre0-5081-g8a9665315 Machine configuration directory is '/home/linuxcnc/linuxcnc/configs/sim.gmoccapy.lathe_configs' Machine configuration file is 'lathe_C.ini' Starting LinuxCNC... Found file(REL): ./core_sim_lathe_C.hal Note: Using POSIX realtime identityKinematicsSetup: coordinates:XZC Joint 0 ==> Axis X Joint 1 ==> Axis Z Joint 2 ==> Axis C identityKinematicsSetup: Recommend: kinstype=both Found file(REL): ./spindle_sim.hal Found file(REL): ./simulated_home_lathe.hal not enough values to unpack (expected 2, got 1) 'btn_sel_next' 'btn_sel_prev' 'btn_select' 'btn_home' 'btn_dir_up' 'btn_jump_to' not enough values to unpack (expected 2, got 1) not enough values to unpack (expected 2, got 1) 'IconFileSelection' object has no attribute 'on_btn_jump_to' not enough values to unpack (expected 2, got 1) not enough values to unpack (expected 2, got 1) Icon from stock 0 = /usr/bin/gmoccapy 1 = -ini 2 = /home/linuxcnc/linuxcnc/configs/sim.gmoccapy.lathe_configs/lathe_C.ini Entry = trivkins Entry = coordinates=XZC found the following coordinates xzc **** GMOCCAPY GETINIINFO **** Number of joints = 3 3 COORDINATES found = xzc joint 0 = axis x joint 1 = axis z joint 2 = axis c {0: 'x', 1: 'z', 2: 'c'} **** GMOCCAPY GETINIINFO **** [KINS] KINESTYPE is trivkins **** GMOCCAPY GETINIINFO **** No MIN_ANGULAR_VELOCITY entry found in [DISPLAY] of INI file Using default value of 0.1 degree / min **** GMOCCAPY GETINIINFO **** No DEFAULT_ANGULAR_VELOCITY entry found in [DISPLAY] of INI file Using default value of 360 degree / min **** GMOCCAPY GETINIINFO **** No MAX_ANGULAR_VELOCITY entry found in [DISPLAY] of INI file Using default value of 3600 degree / min **** GMOCCAPY GETINIINFO **** No MAX_RAPID_OVERRIDE entry found in [DISPLAY] of INI file Default settings 100 % applied! **** GMOCCAPY GETINIINFO **** Preference file path: /home/linuxcnc/linuxcnc/configs/sim.gmoccapy.lathe_configs/lathe_c.pref **** GMOCCAPY GETINIINFO **** No DEFAULT_SPINDLE_SPEED entry found in [DISPLAY] of INI file **** GMOCCAPY INFO **** **** no valid probe config in INI File **** **** disabled tool measurement **** **** GMOCCAPY INFO **** **** Entering make_DRO axis_list = ['x', 'z', 'c'] **** GMOCCAPY INFO **** **** Entering make ref axis button /usr/bin/gmoccapy:717: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations lbl = Gtk.Label("") Filepath = /usr/share/gmoccapy/images/ref_all.png get button with image Filepath = /usr/share/gmoccapy/images/ref_x.png get button with image Filepath = /usr/share/gmoccapy/images/ref_z.png get button with image Filepath = /usr/share/gmoccapy/images/ref_c.png get button with image Filepath = /usr/share/gmoccapy/images/unhome.png get button with image get button with image /usr/bin/gmoccapy:735: DeprecationWarning: Gtk.Image.set_from_stock is deprecated image.set_from_stock(stock, 48) **** GMOCCAPY INFO **** **** Entering make touch button /usr/bin/gmoccapy:896: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations btn = Gtk.ToggleButton(_(" edit\noffsets")) /usr/bin/gmoccapy:900: DeprecationWarning: Gtk.Widget.modify_bg is deprecated btn.modify_bg(Gtk.StateFlags.ACTIVE, Gdk.color_parse("#FFFF00")) get button with image get button with image get button with image /usr/bin/gmoccapy:944: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations btn = Gtk.Button(_("zero\n G92")) /usr/bin/gmoccapy:959: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations btn = Gtk.Button(_(" set\nselected")) get button with image **** GMOCCAPY INFO **** **** Entering make jog increments **** GMOCCAPY INFO **** **** Entering make jog button /usr/bin/gmoccapy:1168: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations btn = Gtk.Button(name.upper()) **** GMOCCAPY INFO **** **** Entering make macro button **** GMOCCAPY INFO **** File i_am_lost.ngc of the macro ['i_am_lost'] could not be found **** we searched in subdirectories: ['macros'] **** GMOCCAPY INFO **** File halo_world.ngc of the macro ['halo_world'] could not be found **** we searched in subdirectories: ['macros'] **** GMOCCAPY INFO **** File jog_around.ngc of the macro ['jog_around'] could not be found **** we searched in subdirectories: ['macros'] **** GMOCCAPY INFO **** File increment.ngc of the macro ['increment xinc yinc'] could not be found **** we searched in subdirectories: ['macros'] **** GMOCCAPY INFO **** File go_to_position.ngc of the macro ['go_to_position X-pos Y-pos Z-pos'] could not be found **** we searched in subdirectories: ['macros'] found 0 Macros get button with image get button with image get button with image **** GMOCCAPY INFO **** **** we have a lathe here False /usr/bin/gmoccapy:1376: DeprecationWarning: Gtk.Table.resize is deprecated self.widgets.tbl_jog_btn_axes.resize(3,4) **** GMOCCAPY INFO **** **** arrange DRO 4 **** GMOCCAPY INFO **** **** Place in table **** GMOCCAPY INFO **** **** get DRO order **** GMOCCAPY INFO **** **** arrange JOG button (gmoccapy:2710): Gtk-WARNING **: 20:40:46.028: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:40:46.029: Invalid icon size 48 task: main loop took 0.138263 seconds **** GMOCCAPY INFO **** **** Invalid embedded tab configuration **** **** No tabs will be added! **** **** GMOCCAPY INFO **** **** no audio available! **** **** PYGST library not installed? **** **** is python-gstX.XX installed? **** **** GMOCCAPY INFO **** **** Entering init gremlin **** Kinematics type changed _set_enable_tooltips = True 'IconFileSelection' object has no attribute 'on_btn_jump_to' **** GMOCCAPY INFO **** **** No virtual keyboard installed, we checked for . **** try sudo apt-get install onboard /usr/bin/gmoccapy:3140: DeprecationWarning: Gtk.FontButton.get_font_name is deprecated self.notification.set_property('font', self.widgets.fontbutton_popup.get_font_name()) /usr/bin/gmoccapy:349: DeprecationWarning: Gtk.FontButton.set_font_name is deprecated self.widgets.fontbutton_popup.set_font_name(self.prefs.getpref("message_font", "sans 10", str)) /usr/bin/gmoccapy:445: DeprecationWarning: Gtk.ColorButton.set_color is deprecated self.widgets.abs_colorbutton.set_color(Gdk.color_parse(self.abs_color)) **** GMOCCAPY INFO : inifile = /home/linuxcnc/linuxcnc/configs/sim.gmoccapy.lathe_configs/lathe_C.ini ****: **** GMOCCAPY INFO : postgui halfile = ['gmoccapy_postgui.hal'] ****: Jog Pin Changed x+ Jog Button released = x+ Jog Pin Changed x- Jog Button released = x- Jog Pin Changed z+ Jog Button released = z+ Jog Pin Changed z- Jog Button released = z- Jog Pin Changed c+ Jog Button released = c+ Jog Pin Changed c- Jog Button released = c- on tool change task: main loop took 0.028511 seconds IDLE 1 2 MANUAL Mode RUN IDLE ntb_button_switch_page on button home clicked = ref_all Hal Status not all homed 02 Hal Status not all homed 0 hal status motion mode changed Hal Status all homed ntb_button_switch_page mode MDI task: main loop took 0.022412 seconds MDI Mode False ntb_button_switch_page hal status motion mode changed mode Manual task: main loop took 0.018852 seconds MANUAL Mode ntb_button_switch_page hal status motion mode changed Jog Button pressed = z+ Jog Button released = z+ Jog Button pressed = z- Jog Button released = z- Jog Button pressed = x- Jog Button released = x- Jog Button pressed = x+ Jog Button released = x+ Jog Button pressed = c- Jog Button released = c- Jog Button pressed = c+ Jog Button released = c+ mode MDI task: main loop took 0.021559 seconds MDI Mode False ntb_button_switch_page hal status motion mode changed mode Manual task: main loop took 0.018861 seconds MANUAL Mode ntb_button_switch_page hal status motion mode changed mode MDI task: main loop took 0.021963 seconds MDI Mode False ntb_button_switch_page hal status motion mode changed Found an error! The following information may be useful in troubleshooting: Traceback (most recent call last): File "/usr/bin/gmoccapy", line 2279, in _periodic self._update_vc() File "/usr/bin/gmoccapy", line 3773, in _update_vc diameter = int(self.dro_dic["Combi_DRO_0"].get_position()[1] * 2) File "/usr/lib/python3/dist-packages/gladevcp/combi_dro.py", line 633, in get_position positions = self._position() TypeError: _position() missing 5 required positional arguments: 'object', 'p', 'rel_p', 'dtg', and 'joint_actual_position' (gmoccapy:2710): Gtk-WARNING **: 20:41:11.358: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:11.358: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:11.415: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:11.416: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:11.485: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:11.485: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:13.470: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:13.471: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:13.534: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:13.534: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:13.602: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:13.602: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:13.678: Invalid icon size 48 (gmoccapy:2710): Gtk-WARNING **: 20:41:13.678: Invalid icon size 48 mode Manual task: main loop took 0.018480 seconds MANUAL Mode ntb_button_switch_page hal status motion mode changed Jog Button pressed = z+ Jog Button released = z+ Jog Button pressed = z- Jog Button released = z- Jog Button pressed = x- Jog Button released = x- Jog Button pressed = x+ Jog Button released = x+ Jog Button pressed = c+ Jog Button released = c+ Jog Button pressed = c- Jog Button released = c- mode MDI task: main loop took 0.021074 seconds MDI Mode False ntb_button_switch_page hal status motion mode changed task: main loop took 0.134889 seconds ntb_button_switch_page IDLE MANUAL Mode hal status motion mode changed estoping / killing gmoccapy _kill_dynamic_childs _kill_dynamic_childs Shutting down and cleaning up LinuxCNC... task: 52146 cycles, min=0.000007, max=0.138263, avg=0.001074, 15 latency excursions (> 10x expected cycle time of 0.001000s) Note: Using POSIX realtime linuxcnc@lcnc-lathe:~$ ```

Information about my hardware and software:

Other

This exact same error presented itself in debian 11, building a binary myself from master. This error also presents in debian 10 (linuxCNC ISO) wth a buildbot master install. Switching from debian 11 back to 10 was an attempt at troubleshooting by getting back onto a supported version. Both fresh installs happened this weekend.

On debian 11, two similar errors appeared (though I forget steps to reproduce, I did play with an axis spindle orient sim, as well as gmoccapy):

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gladevcp/combi_dro.py", line 271, in _on_eventbox_clicked
self.toggle_readout()
TypeError: 'bool' object is not callable

And

Traceback (most recent call last):
File "usr/lib/python3/dist-packages/gladevcp/offsetpage_widget.py", line 314, in set_editing
self.store[i][12]=self.convert_color(color)
File "usr/lib/python3/dist-packages/gladevcp/offset_page_widget.py", line 454, in convert_color
colortuple=((int(color.red*255.0),int(color.green*255.0),int(color.blue*255.0)))
AttributeError: 'NoneType' object has no attribute 'red'
hansu commented 2 years ago

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gladevcp/combi_dro.py", line 271, in _on_eventbox_clicked self.toggle_readout() TypeError: 'bool' object is not callable

Fixed in https://github.com/LinuxCNC/linuxcnc/pull/1512

hansu commented 2 years ago

@LJspice Can you try to reproduce the third error? Thanks!

hansu commented 2 years ago

And also clicking on D opens the entry for R. I don't know if this is intended...

grafik

LJspice commented 2 years ago

@hansu I went through and clicked every button in the GUI to reproduce:

  1. estop off, run on
  2. Home machine
  3. Go into offsets page
  4. Edit offsets
  5. Click return arrow, bottom right
  6. Get error

image

hansu commented 2 years ago

The main issues is fixed in https://github.com/LinuxCNC/linuxcnc/pull/1512/commits/2a488fa7f03f94a73fcfe695ee6c7c4fe740fea8

hansu commented 2 years ago

And I don't know if it is inteded that one of the DRO elements has no color, because this is also in the 2.8.2 release.

grafik