Skip to content

After the scale detection fails, program crashes when trying to import that photo

  1. Run in debug mode.
  2. File/New project...
  3. Select Pyrrhocoris4-etac.tif for importing. Uncheck downsampling.
  4. Extract scale from scale markers. Scale detection fails (sad, but no catastrophe), "Scale marker" seems to be the whole image, "Reference length" is "None".
  5. "Create". Program crashes:
Current photo is now Pyrrhocoris4-etac.tif
reacting to photo update 0 for Pyrrhocoris4-etac.tif
reacting to photo update 0 for Pyrrhocoris4-etac.tif
reacting to photo update 0 for Pyrrhocoris4-etac.tif
reacting to photo update 0 for Pyrrhocoris4-etac.tif
Traceback (most recent call last):
  File "D:\work\arthropods\arthropoddescriber2repository\arthropod_describer_py\arthropod_describer\common\scale_setting_widget.py", line 357, in set_photo
    self.set_line(scale_line, scale_setting.reference_length)
  File "D:\work\arthropods\arthropoddescriber2repository\arthropod_describer_py\arthropod_describer\common\scale_setting_widget.py", line 470, in set_line
    self._spboxReference_mm.setValue(ref_length.value)
AttributeError: 'NoneType' object has no attribute 'value'

Process finished with exit code 1