You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go to the napari "Plugins" menu, then "empanada-napari", and click "3D Inference"
Check the box labelled "Run ortho-plane"
Click the button to begin "3D Inference"
Error message
Traceback (most recent call last):
File "/Users/genevieb/mambaforge/envs/napari-empanada-dev/lib/python3.9/site-packages/magicgui/widgets/_bases/value_widget.py", line 57, in _on_value_changeself.changed.emit(value)
File "psygnal/_signal.py", line 681, in psygnal._signal.SignalInstance.emit
File "/Users/genevieb/mambaforge/envs/napari-empanada-dev/lib/python3.9/site-packages/magicgui/events.py", line 86, in _run_emit_loop
cb(*args[:max_args])
File "/Users/genevieb/mambaforge/envs/napari-empanada-dev/lib/python3.9/site-packages/magicgui/widgets/_function_gui.py", line 200, in _disable_button_and_callself.__call__()
File "/Users/genevieb/mambaforge/envs/napari-empanada-dev/lib/python3.9/site-packages/magicgui/widgets/_function_gui.py", line 306, in __call__
value =self._function(*bound.args, **bound.kwargs)
File "/Users/genevieb/Documents/GitHub/empanada/empanada-napari/empanada_napari/_volume_inference.py", line 174, in widget
widget.engine.update_params(
TypeError: update_params() missing 2 required positional arguments: 'merge_iou_thr' and 'merge_ioa_thr'
Why this error happens, and what we should do about it
This error happens because the update_params method for the Engine3d class is expecting to be passed values for merge_iou_thr and merge_ioa_thr.
A better solution might be to use keyword only arguments for update methods. Then if no keyword argument is passed in for a particular kwarg, you could have it fall back on the default value that was provided in the __init__ and stored as an attribute eg: self.attributename.
There might also be a clearner/nicer solution than this. I'm not sure what the recommended way to update multiple attributes at once is.
Since this affects me, I'm happy to put in a pull request, but we'd need to settle on the approach to take first.
The text was updated successfully, but these errors were encountered:
Thanks for catching this! Originally I had merge_iou_thr and merge_ioa_thr as changeable parameters before deciding that they were mostly unnecessary for users to tweak. When I removed them from the widget I forgot to update the update_params method.
For now (and unless there's a use case where they need to be changed) I'm just going to leave them hard-coded. Otherwise, I think that making them kwargs would be the way to go.
I pushed a new version (0.1.3) that won't have this problem. Hopefully, it works for you.
I get an error during 3D inference, when the "Run ortho-plane" box is checked.
Steps to reproduce
Error message
Why this error happens, and what we should do about it
This error happens because the
update_params
method for theEngine3d
class is expecting to be passed values formerge_iou_thr
andmerge_ioa_thr
.A better solution might be to use keyword only arguments for update methods. Then if no keyword argument is passed in for a particular kwarg, you could have it fall back on the default value that was provided in the
__init__
and stored as an attribute eg:self.attributename
.There might also be a clearner/nicer solution than this. I'm not sure what the recommended way to update multiple attributes at once is.
Since this affects me, I'm happy to put in a pull request, but we'd need to settle on the approach to take first.
The text was updated successfully, but these errors were encountered: