Open aloboa opened 1 month ago
I think this is the same than or very related to https://github.com/bauerdavid/napari-nD-annotator/issues/51 I actually get the same problem on a linux machine. What is surprising is that today's installation with napari 0.5.4 reports napari-2D-annotator 0.1.1, while I have an older environment with napari 0.4.19 reporting napari-2D-annotator 0.2.3 (which works). How can today's version of napari-2D-annotator be older?
Hey @aloboa, I don't think that it is the same as #51, there using the newest numpy version caused the error, but here there are multiple things:
It would be a huge help if you could try installing the plugin from git. It requires building some C/C++ code, so this might not be trivial. If you need any help with this, please let me know.
Also, could you check the path the plugin's looking for? It's C:/Users/usuario/AppData/Local/napari/napari\nd_annotator_config.yaml
C:/Users/usuario/AppData/Local/napari/napari\ exists, but nd_annotator_config.yaml does not.
It would be a huge help if you could try installing the plugin from git. It requires building some C/C++ code, so this might not be trivial. If you need any help with this, please let me know.
I would be happy to help on a linux machine. Cannot help on Windows (I was just trying to help out an student). I can invest some time this week, next week will be more difficult, but should be able to help again afterwards. Would need your guide, though. Perhaps will make you waste more time than actually helping out.
I post here the report of my try on a ubuntu 22.04 machine:
conda create -y -n nDannot-env -c conda-forge python=3.10
conda activate nDannot-env
python -m pip install "napari[all]"
Installing collected packages: pytz, PyQt5-Qt5, ptyprocess, appdirs, urllib3, six, rpds-py, PyYAML, PyQt5-sip, pexpect, kiwisolver, idna, fasteners, decorator, certifi, attrs, referencing, PyQt5, pydantic, jsonschema-specifications, jsonschema, app-model, napari
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
catboost 1.2.7 requires matplotlib, which is not installed.
catboost 1.2.7 requires plotly, which is not installed.
Successfully installed PyQt5-5.15.11 PyQt5-Qt5-5.15.15 PyQt5-sip-12.15.0 PyYAML-6.0.2 app-model-0.3.0 appdirs-1.4.4 attrs-24.2.0 certifi-2024.8.30 decorator-5.1.1 fasteners-0.19 idna-3.10 jsonschema-4.23.0 jsonschema-specifications-2023.12.1 kiwisolver-1.4.7 napari-0.5.4 pexpect-4.9.0 ptyprocess-0.7.0 pydantic-2.9.2 pytz-2024.2 referencing-0.35.1 rpds-py-0.20.0 six-1.16.0 urllib3-2.2.3
python -m pip install "napari[all]" --upgrade
pip install napari-nD-annotator[all]
Installing collected packages: pyparsing, fonttools, cycler, contourpy, matplotlib, napari-nD-annotator, napari-bbox
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
catboost 1.2.7 requires plotly, which is not installed.
Successfully installed contourpy-1.3.0 cycler-0.12.1 fonttools-4.54.1 matplotlib-3.9.2 napari-bbox-0.0.8 napari-nD-annotator-0.1.0 pyparsing-3.1.4
napari I get napari 0.5.4 and napari-nd-annotatro 0.1.0 which can be updates to v0.2.3 (which I do and quit)
napari and start the plugin: $ napari /home/alobo2/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari/utils/migrations.py:101: FutureWarning: Argument 'edge_color' is deprecated, please use 'border_color' instead. The argument 'edge_color' was deprecated in 0.5.0 and it will be removed in 0.6.0.! Then add an image and start the plugin. Many error messages to the console, and the right part of the plugin GUI does not appear:
AttributeError Traceback (most recent call last)
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari_nd_annotator/_widgets/minimal_contour_widget.py:674, in MinimalContourWidget.set_image(self=
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari_nd_annotator/minimal_contour/feature_manager.py:40, in FeatureManager.get_features(self=
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari_nd_annotator/minimal_contour/feature_manager.py:98, in FeatureManager.init_file(self=
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari_nd_annotator/minimal_contour/feature_manager.py:112, in FeatureManager.start_feature_calculation(self=
AttributeError Traceback (most recent call last) File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/app_model/backends/qt/_qaction.py:57, in QCommandAction._on_triggered(self=QMenuItemAction(MenuItem(when=None, group='3_plu...Annotation Toolbox)'))), alt=None), app='napari'), checked=True) 53 def _on_triggered(self, checked: bool) -> None: 54 # execute_command returns a Future, for the sake of eventually being 55 # asynchronous without breaking the API. For now, we call result() 56 # to raise any exceptions. ---> 57 self._app.commands.execute_command(self._command_id).result() self._command_id = 'napari-nD-annotator:Annotation Toolbox' self = QMenuItemAction(MenuItem(when=None, group='3_plugin_contributions', order=None, command=CommandRule(id='napari-nD-annotator:Annotation Toolbox', title='Annotation Toolbox', category=None, tooltip=None, status_tip=None, icon=None, icon_visible_in_menu=True, enablement=None, short_title=None, toggled=ToggleRule(condition=None, get_current=functools.partial(<function _get_current_dock_status at 0x7e704cbe0d30>, full_name='Annotation Toolbox (Annotation Toolbox)'))), alt=None), app='napari') self._app = Application('napari')
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/app_model/registries/_commands_reg.py:245, in CommandsRegistry.execute_command(self=<CommandsRegistry at 0x7e704cbf3340 (152 commands)>, id='napari-nD-annotator:Annotation Toolbox', execute_asynchronously=False, *args=(), **kwargs={})
241 except Exception as e:
242 if self._raise_synchronous_exceptions:
243 # note, the caller of this function can also achieve this by
244 # calling future.result()
on the returned future object.
--> 245 raise e
246 future.set_exception(e)
248 return future
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/app_model/registries/_commands_reg.py:240, in CommandsRegistry.execute_command(self=<CommandsRegistry at 0x7e704cbf3340 (152 commands)>, id='napari-nD-annotator:Annotation Toolbox', execute_asynchronously=False, *args=(), *kwargs={})
238 future: Future = Future()
239 try:
--> 240 future.set_result(cmd(args, **kwargs))
future = <Future at 0x7e701878efe0 state=pending>
cmd = <function Store.inject.future.result()
on the returned future object.
File ~/.local/lib/python3.10/site-packages/in_n_out/_store.py:934, in Store.inject_processors.
File ~/.local/lib/python3.10/site-packages/in_n_out/_store.py:804, in Store.inject.
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari/_qt/_qplugins/_qnpe2.py:350, in _toggle_or_get_widget(plugin='napari-nD-annotator', widget_name='Annotation Toolbox', full_name='Annotation Toolbox (Annotation Toolbox)')
348 if widget_param:
349 kwargs[widget_param] = viewer
--> 350 return widget_callable(**kwargs), full_name
kwargs = {'viewer': Viewer(camera=Camera(center=(0.0, 959.5, 1279.5), zoom=0.2070703125, angles=(0.0, 0.0, 90.0), perspective=0.0, mouse_pan=True, mouse_zoom=True), cursor=Cursor(position=(0.0, -509.2477596787735, 0.0), scaled=True, style=<CursorStyle.CROSSHAIR: 'crosshair'>, size=1.0), dims=Dims(ndim=3, ndisplay=2, order=(0, 1, 2), axis_labels=('0', '1', '2'), rollable=(True, True, True), range=(RangeTuple(start=-0.5, stop=511.5, step=1.0), RangeTuple(start=0.0, stop=1919.0, step=1.0), RangeTuple(start=0.0, stop=2559.0, step=1.0)), margin_left=(0.0, 0.0, 0.0), margin_right=(0.0, 0.0, 0.0), point=(0.0, 959.0, 1279.0), last_used=0), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[<Image layer 'DI17_2' at 0x7e701831c790>, <Points layer '🔒 from E' at 0x7e6fac14e2c0>, <Points layer '🔒 to S' at 0x7e6fac1eaa40>, <Points layer '🔒 temp' at 0x7e7040963760>, <Points layer 'Anchors [DO NOT ALTER]' at 0x7e7040963430>], help='use <4> for pan/zoom, use <5> for transform, use <3> for select points', status='', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_over_canvas=False, mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[<function dims_scroll at 0x7e704dc965f0>], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, _keymap={<KeyBinding at 0x7e6fac14e3b0: Ctrl+1>: <function MinimalContourWidget.init.
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari_nd_annotator/_widgets/annotator_module.py:70, in AnnotatorWidget.init(self=
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari_nd_annotator/_widgets/minimal_contour_widget.py:322, in MinimalContourWidget.init(self=
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari_nd_annotator/_widgets/minimal_contour_widget.py:337, in MinimalContourWidget.set_use_smoothing(self=
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari_nd_annotator/_widgets/minimal_contour_widget.py:674, in MinimalContourWidget.set_image(self=
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari_nd_annotator/minimal_contour/feature_manager.py:40, in FeatureManager.get_features(self=
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari_nd_annotator/minimal_contour/feature_manager.py:98, in FeatureManager.init_file(self=
File ~/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari_nd_annotator/minimal_contour/feature_manager.py:112, in FeatureManager.start_feature_calculation(self=
AttributeError: 'Image' object has no attribute '_slice_indices'
For starters trying on Linux is also super helpful! Try to install the plugin as:
python -m pip install git+https://github.com/bauerdavid/napari-nD-annotator
. This will install the newest unpublished version of the plugin from source.
It works very nicely on napari 0.5.4 (linux), thanks! I will try to install on windows tomorrow, I would like to get a few people digitizing for a project next week and they all use windows.
Great, thanks! I'll try to release asap, just need to fix some things before that.
Tried on Windows too. I installed miniconda and then last version of napari:
conda create -y -n napari-env -c conda-forge python=3.10
conda activate napari-env
conda install -c conda-forge napari pyqt
conda update napari
python -m pip install git+https://github.com/bauerdavid/napari-nD-annotator
failed because git was not installed in this machine. I installed
https://github.com/git-for-windows/git/releases/download/v2.46.2.windows.1/Git-2.46.2-64-bit.exe
and had to reboot
python -m pip install git+https://github.com/bauerdavid/napari-nD-annotator
the git download worked but installation failed again because Visual Studio Build Tools 2022 was required and had not been installed in this machine:
running build_ext
building 'napari_nd_annotator.minimal_contour._eikonal_wrapper' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for napari-nD-annotator
Failed to build napari-nD-annotator
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (napari-nD-annotator)
I installed Visual Studio Build Tools 2022 from https://aka.ms/vs/17/release/vs_BuildTools.exe (which is a pain, could this be avoided in the future?) and this time python -m pip install git+https://github.com/bauerdavid/napari-nD-annotator worked. The plugin is being used in that machine now.
At least with the windows installation, the plugin does not work with color images. Once I start the plugin and dro the image, I get:
napari-env) C:\Users\Nuria>napari
Traceback (most recent call last):
File "C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py", line 37, in __init__
with open(self._config_path, "w") as new_file, open(default_settings_path, "r") as def_file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/Nuria/AppData/Local/napari/napari\\nd_annotator_config.yaml'
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'fill_objects_checkbox' not found in config file!
Traceback (most recent call last):
File "C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py", line 37, in __init__
with open(self._config_path, "w") as new_file, open(default_settings_path, "r") as def_file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/Nuria/AppData/Local/napari/napari\\nd_annotator_config.yaml'
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'method_dropdown' not found in config file!
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'n_points' not found in config file!
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'rpsv_iterations_spinbox' not found in config file!
Traceback (most recent call last):
File "C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py", line 37, in __init__
with open(self._config_path, "w") as new_file, open(default_settings_path, "r") as def_file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/Nuria/AppData/Local/napari/napari\\nd_annotator_config.yaml'
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'feature_dropdown' not found in config file!
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'param_spinbox' not found in config file!
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'blur_image_checkbox' not found in config file!
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'blur_image_slider' not found in config file!
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'smooth_contour_checkbox' not found in config file!
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'smooth_contour_spinbox' not found in config file!
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'point_size_spinbox' not found in config file!
C:\Users\Nuria\miniconda3\envs\napari-env\lib\site-packages\napari\utils\migrations.py:101: FutureWarning: Argument 'edge_color' is deprecated, please use 'border_color' instead. The argument 'edge_color' was deprecated in 0.5.0 and it will be removed in 0.6.0.!
image should have 3 channels
Only the 1st point is set, if I go on clicking, napari crashes:
WARNING: QObject::killTimer: Timers cannot be stopped from another thread
11:39:13 : WARNING : Dummy-1 : QObject::killTimer: Timers cannot be stopped from another thread
WARNING: QObject::~QObject: Timers cannot be stopped from another thread
11:39:13 : WARNING : Dummy-1 : QObject::~QObject: Timers cannot be stopped from another thread
Instead, the plugin works fine on linux, including color images. The only output to the console is:
$ napari
/home/alobo2/miniforge3/envs/nDannot-env/lib/python3.10/site-packages/napari/utils/migrations.py:101: FutureWarning: Argument 'edge_color' is deprecated, please use 'border_color' instead. The argument 'edge_color' was deprecated in 0.5.0 and it will be removed in 0.6.0.!
That's strange... Could you send the image you want to annotate? I'm working on a Windows machine, and works fine for me with rgb images.
Traceback (most recent call last):
File "C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py", line 37, in __init__
with open(self._config_path, "w") as new_file, open(default_settings_path, "r") as def_file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/avill/AppData/Local/napari/napari\\nd_annotator_config.yaml'
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'fill_objects_checkbox' not found in config file!
Traceback (most recent call last):
File "C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py", line 37, in __init__
with open(self._config_path, "w") as new_file, open(default_settings_path, "r") as def_file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/avill/AppData/Local/napari/napari\\nd_annotator_config.yaml'
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'method_dropdown' not found in config file!
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'n_points' not found in config file!
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'rpsv_iterations_spinbox' not found in config file!
Traceback (most recent call last):
File "C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py", line 37, in __init__
with open(self._config_path, "w") as new_file, open(default_settings_path, "r") as def_file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/avill/AppData/Local/napari/napari\\nd_annotator_config.yaml'
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'feature_dropdown' not found in config file!
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'param_spinbox' not found in config file!
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'blur_image_checkbox' not found in config file!
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'blur_image_slider' not found in config file!
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'smooth_contour_checkbox' not found in config file!
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'smooth_contour_spinbox' not found in config file!
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'point_size_spinbox' not found in config file!
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari\utils\migrations.py:101: FutureWarning: Argument 'edge_color' is deprecated, please use 'border_color' instead. The argument 'edge_color' was deprecated in 0.5.0 and it will be removed in 0.6.0.!
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\minimal_contour_widget.py:709: UserWarning: Cannot delete a single point. Cleared all anchor points!
C:\Users\avill\miniconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\_widgets\minimal_contour_widget.py:414: UserWarning: There's nothing to revert.!
image should have 3 channels
image should have 3 channels
image should have 3 channels
image should have 3 channels
The actual crash was related to the image size, not to the color. Large color image (just one I happen to have, not microscopy) (crashing): https://www.dropbox.com/scl/fi/05addu428ytwnp55j7050/pantano1_200.tif?rlkey=a9ywy3pg0miwoagthe0xk4ocd&dl=0
This microscopy color image behaves as the grey scale one: https://www.dropbox.com/scl/fi/5nyxye9n1br6lbr0bzhh3/DI_17_2.tif?rlkey=z47tmleq888wg06rdhc3cc6iz&dl=0
Regarding RGBA images, not a big problem once we know it. The A channel is always constant in our images (and not all programs actually write it), so we will just eliminate it.
Conda installation on a windows machine. Image displayed in napari. Select plugin from the menu. Right menu does not appear. Console errors: (base) C:\Users\usuario>conda activate napari-env
(napari-env) C:\Users\usuario>napari
Traceback (most recent call last):
File "C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py", line 37, in init with open(self._config_path, "w") as new_file, open(default_settings_path, "r") as def_file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/usuario/AppData/Local/napari/napari\nd_annotator_config.yaml'
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'fill_objects_checkbox' not found in config file!
Traceback (most recent call last):
File "C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py", line 37, in init with open(self._config_path, "w") as new_file, open(default_settings_path, "r") as def_file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/usuario/AppData/Local/napari/napari\nd_annotator_config.yaml'
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'method_dropdown' not found in config file!
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'n_points' not found in config file!
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'rpsv_iterations_spinbox' not found in config file!
Traceback (most recent call last):
File "C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py", line 37, in init with open(self._config_path, "w") as new_file, open(default_settings_path, "r") as def_file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/usuario/AppData/Local/napari/napari\nd_annotator_config.yaml'
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'feature_dropdown' not found in config file!
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'param_spinbox' not found in config file!
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'blur_image_checkbox' not found in config file!
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'blur_image_slider' not found in config file!
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'smooth_contour_checkbox' not found in config file!
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'smooth_contour_spinbox' not found in config file!
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets_utils\persistence\persistent_widget_state.py:77: UserWarning: id 'point_size_spinbox' not found in config file!
C:\Users\usuario\anaconda3\envs\napari-env\lib\site-packages\napari\utils\migrations.py:101: FutureWarning: Argument 'edge_color' is deprecated, please use 'border_color' instead. The argument 'edge_color' was deprecated in 0.5.0 and it will be removed in 0.6.0.!
AttributeError Traceback (most recent call last)
File ~\anaconda3\envs\napari-env\lib\site-packages\app_model\backends\qt_qaction.py:57, in QCommandAction._on_triggered(self=QMenuItemAction(MenuItem(when=None, group='3_plu...Annotation Toolbox)'))), alt=None), app='napari'), checked=True)
---> 57 self._app.commands.execute_command(self._command_id).result()
File ~\anaconda3\envs\napari-env\lib\site-packages\app_model\registries_commands_reg.py:245, in CommandsRegistry.execute_command(self=<CommandsRegistry at 0x2a67c483820 (146 commands)>, id='napari-nD-annotator:Annotation Toolbox', execute_asynchronously=False, *args=(), **kwargs={})
--> 245 raise e
File ~\anaconda3\envs\napari-env\lib\site-packages\app_model\registries_commands_reg.py:240, in CommandsRegistry.execute_command(self=<CommandsRegistry at 0x2a67c483820 (146 commands)>, id='napari-nD-annotator:Annotation Toolbox', execute_asynchronously=False, *args=(), **kwargs={})
--> 240 future.set_result(cmd(*args, **kwargs))
File ~\anaconda3\envs\napari-env\lib\site-packages\in_n_out_store.py:934, in Store.inject_processors.._deco.._exec(*args=(), **kwargs={})
--> 934 result = func(*args, **kwargs)
(...)
File ~\anaconda3\envs\napari-env\lib\site-packages\in_n_out_store.py:804, in Store.inject.._inner.._exec(*args=(), **kwargs={})
--> 804 result = func(**bound.arguments)
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_qt_qplugins_qnpe2.py:350, in _toggle_or_get_widget(plugin='napari-nD-annotator', widget_name='Annotation Toolbox', full_name='Annotation Toolbox (Annotation Toolbox)')
--> 350 return widget_callable(**kwargs), full_name
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets\annotator_module.py:70, in AnnotatorWidget.init(self=, viewer=Viewer(camera=Camera(center=(0.0, 959.5, 1279.5)...malContourWidget object at 0x000002A60F9A44C0>>}))
---> 70 self.minimal_contour_widget = MinimalContourWidget(viewer, self)
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets\minimal_contour_widget.py:322, in MinimalContourWidget.init(self=, viewer=Viewer(camera=Camera(center=(0.0, 959.5, 1279.5)...malContourWidget object at 0x000002A60F9A44C0>>}), parent=)
--> 322 self.set_use_smoothing(self.blur_image_checkbox.isChecked())
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets\minimal_contour_widget.py:337, in MinimalContourWidget.set_use_smoothing(self=, use_smoothing=False)
--> 337 self.set_image()
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator_widgets\minimal_contour_widget.py:674, in MinimalContourWidget.set_image(self=, *args=())
--> 674 grad_x, grad_y = self.feature_manager.get_features(self.image.layer)
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\minimal_contour\feature_manager.py:40, in FeatureManager.get_features(self=, layer=<Image layer 'DI17_2'>, block=True)
---> 40 self.init_file(layer, dims_displayed)
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\minimal_contour\feature_manager.py:98, in FeatureManager.init_file(self=, layer=<Image layer 'DI17_2'>, dims_displayed=(0, 1))
---> 98 self.start_feature_calculation(layer)
File ~\anaconda3\envs\napari-env\lib\site-packages\napari_nd_annotator\minimal_contour\feature_manager.py:112, in FeatureManager.start_feature_calculation(self=, layer=<Image layer 'DI17_2'>)
--> 112 slice_indices = layer._slice_indices
AttributeError: 'Image' object has no attribute '_slice_indices'