missing argument to on_tools_delete function - fixed for next version

Issue #497 new
Andrew Howard created an issue

When trying to delete a tool from the tool list in the Geometry editor (and maybe other editors), it looks like you’re supposed to right click the tool and choose delete. Doing so invariably crashes the program, however, with

TypeError: on_tool_delete() missing 1 required positional argument: 'clicked_signal

Removing the argument “clicked_signal” from the function definition in appObjects/FlatCAMGeometry.py seems to fix the issue, although your comment about keeping the parameter makes me feel like this may not be the best solution.

For context, I’m on MacOS and Python 3.9 running the latest git Beta branch.

Comments (3)

  1. Spencer Bentley

    Same,

    WARNING: Traceback (most recent call last):
      File "C:\Users\spenc\OneDrive\Desktop\FlatCAM_beta_8.994_sources\appObjects\FlatCAMGeometry.py", line 578, in <lambda>
        _("Delete"), lambda: self.on_tool_delete(all_tools=None),
    TypeError: on_tool_delete() missing 1 required positional argument: 'clicked_signal'
    

    I tried removing the entry for clicked_signal as it was not used in the function and recived the following:

    WARNING: Traceback (most recent call last):
      File "C:\Users\spenc\OneDrive\Desktop\FlatCAM_beta_8.994_sources\appObjects\FlatCAMGeometry.py", line 578, in <lambda>
        _("Delete"), lambda: self.on_tool_delete(0, all_tools=None),
    TypeError: on_tool_delete() got multiple values for argument 'all_tools'
    

  2. Marius Stanciu

    Hi,
    I’m not really sure but I think that I fixed this some time ago in my working copy (sounds familiar). In any case, this should be included in the next version of the app.
    Best regards,
    Marius

  3. Log in to comment