Closed SaibotMagd closed 3 years ago
Update: I tried the same procedure on another OS (Ubuntu 20 instead of Debian 8) using a fresh installation. Result stays the same but the error changed:
traits - ERROR - Exception occurred in traits notification handler for object: <magmap.gui.visualizer.Visualization object at 0x7f0e7dd15eb8>, trait: rois_check_list, old value: None selected, new value: offset (30,35,30) of size (25,25,12)
Traceback (most recent call last):
File "/home/nrd/anaconda3/envs/mag/lib/python3.6/site-packages/traits/trait_notifiers.py", line 524, in _dispatch_change_event
self.dispatch(handler, *args)
File "/home/nrd/anaconda3/envs/mag/lib/python3.6/site-packages/traits/trait_notifiers.py", line 486, in dispatch
handler(*args)
File "/home/nrd/magellanmapper/magmap/gui/visualizer.py", line 2598, in load_roi
self.detect_blobs(segs=blobs, blob_matches=blob_matches)
File "/home/nrd/magellanmapper/magmap/gui/visualizer.py", line 2158, in detect_blobs
self.redraw_selected_viewer(clear=False)
File "/home/nrd/magellanmapper/magmap/gui/visualizer.py", line 1937, in redraw_selected_viewer
self._launch_roi_editor()
File "/home/nrd/magellanmapper/magmap/gui/visualizer.py", line 2374, in _launch_roi_editor
*stack_args, **stack_args_named, zoom_levels=2)
File "/home/nrd/magellanmapper/magmap/gui/roi_editor.py", line 905, in plot_2d_stack
cmap_labels=cmap_labels)
File "/home/nrd/magellanmapper/magmap/gui/roi_editor.py", line 1309, in show_subplot
self.blobs.blob_matches.get_blobs(1),
File "/home/nrd/magellanmapper/magmap/cv/colocalizer.py", line 106, in get_blobs
if col.value not in self.df:
TypeError: argument of type 'NoneType' is not iterable
Unhandled Python exception
Aborted (core dumped)
Thanks for finding this, @SaibotMagd ! I reproduced it on my end as well, a regression from a new feature added since the Current Protocols. I had partially fixed it (the error in your first stacktrace) but evidently not completely...thanks for reporting it.
I pushed a fix in PR #12 . If you are on Git, you can access it by grabbing the branch:
git fetch; git checkout fix_absent_blob_matches
Please let me know if it works for you and I can merge it.
It seems to work pretty well. I checked the reloading of cell detection after switch to another roi and the reload after complete restart of mag. Both works great. Thanks alot!
Great, thanks for testing it and glad it worked for you!
Hello, I go through the basic protocols right now and it crashes when I try to reload the ROI I set before: Started Mag with:
python run.py --img sample_region.czi --roi_profile lightsheet --offset 30,35,30 --size 25,25,12
I tried to save a second ROI, so the ROI list would be longer, so maybe the "out-of-range" doesn't match but it gave me the same result.
Full output: