Cannot generate cnc job on project file saved in older version software

Issue #204 resolved
Lei Zheng created an issue

The attached project file is save in FlatCAM 8.4. Try to open it using the current master branch, then try to create a cnc job from the geometry object, you will get nothing. The console will output error as

Traceback (most recent call last):
  File "c:\works\pcb\flatcam\code\flatcam\", line 1296, in on_generatecnc_button_click
  File "c:\works\pcb\flatcam\code\flatcam\", line 1327, in generatecncjob
    multidepth = multidepth if multidepth is not None else self.options["multidepth"]
KeyError: 'multidepth'

Because the option multidepth is added after 8.4.

This bug is not easily reproduced by developers, because FlatCAM shares the application default options among different versions. So if a developer changed application default option in newer software, and then try to reproduce this bug by creating a project in older software, there will be no problem. Because the saved project file will contain updated default options.

However, for project saved in older version software with the older default options, like the one I attached here. You will get the error trying to open it in newer software.

Comments (2)

  1. Log in to comment