magicgui
magicgui copied to clipboard
Catch failed parameter loading gracefully
Describe the bug traceback posted on https://forum.image.sc/t/stardist-in-napari-throws-eoferror-ran-out-of-input-error/69669
File ~/Applications/mambaforge/envs/IA-env/lib/python3.9/site-packages/magicgui/widgets/_bases/container_widget.py:322, in ContainerWidget._load(self=<FunctionGui plugin(viewer: napari.viewer.Viewer...utures._base.Future[typing.List[LayerDataTuple]]>, path=PosixPath('/Users/pascalschulthess/Library/Cache...ri._dock_widget._plugin_wrapper.-locals-.plugin'), quiet=True)
320 if not path.exists() and quiet:
321 return
--> 322 for key, val in pickle.loads(path.read_bytes()).items():
path = PosixPath('/Users/pascalschulthess/Library/Caches/magicgui/stardist_napari._dock_widget._plugin_wrapper.-locals-.plugin')
323 val = pickle.loads(val)
324 if val == self.NO_VALUE:
we could catch the case of failing to load the path, and do something (warn? delete the file?)