Mask tool prints many errors
Closed this issue · 6 comments
I've had a report that masking does not work on Macs (some errors printed to console). Could somebody with a Mac and the latest CCP4 please test this?
I have lots of this output when drawing shapes:
lst_par(MaskPage) [['generate_mask']]
activate_me(MaskPage)
cur_nod.ll_command_lst:
[['generate_mask', 'untrusted.circle=803,862,350', 'untrusted.rectangle=1451,2131,969,1435']]
lst_par(MaskPage) [['generate_mask', 'untrusted.circle=803,862,350', 'untrusted.rectangle=1451,2131,969,1435']]
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
However it does appear to have generated a mask after clicking "Run":
Thanks, maybe these errors don't actually stop the masking then. Not very pretty having all that junk written out though :-(
It seems the printing of errors is not specific to Macs. I also got this
Runner(run) ... cmd_lst = ['clean']
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
activate_me(MaskPage)
cur_nod.ll_command_lst:
[['generate_mask']]
lst_par(MaskPage) [['generate_mask']]
except(build_mask_item) ... TypeError
except(build_mask_item) ... TypeError
set_par(MaskPage) [['generate_mask', 'untrusted.rectangle=618,747,671,704'], ['apply_mask ...']]
lst_par(MaskPage) [['generate_mask', 'untrusted.rectangle=618,747,671,704'], ['apply_mask ...']]
activate_me(MaskPage)
cur_nod.ll_command_lst:
[['generate_mask']]
lst_par(MaskPage) [['generate_mask']]
activate_me(MaskPage)
cur_nod.ll_command_lst:
[['generate_mask', 'untrusted.rectangle=618,747,671,704']]
lst_par(MaskPage) [['generate_mask', 'untrusted.rectangle=618,747,671,704']]
except(build_mask_item) ... TypeError
Those errors look like red herrings, they seem to be coming from
DUI/src/dui/outputs_n_viewers/img_viewer.py
Lines 158 to 164 in ca908d3
@luisodls do you know why these exceptions might occur? If it is just try
/except
being used for flow control then perhaps a comment in the code and not writing a message to the logger
would suffice. It is hard to tell from the code which lines trigger the exceptions. Could it be refactored so that the try
block wraps a smaller number of lines?
Fixed.