Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error at reading demo file #103

Closed
aloboa opened this issue Feb 14, 2024 · 4 comments
Closed

Error at reading demo file #103

aloboa opened this issue Feb 14, 2024 · 4 comments

Comments

@aloboa
Copy link

aloboa commented Feb 14, 2024

$ napari 'https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.1/6001240.zarr/'
19:36:17 WARNING version mismatch: detected: FormatV01, requested: FormatV04
Traceback (most recent call last):
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/_qt/qt_viewer.py", line 953, in _qt_open
    self.viewer.open(
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/components/viewer_model.py", line 1102, in open
    layers = self._open_or_raise_error(
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/components/viewer_model.py", line 1222, in _open_or_raise_error
    raise MultipleReaderError(
napari.errors.reader_errors.MultipleReaderError: Multiple plugins found capable of reading https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.1/6001240.zarr/. Select plugin from {'napari-ome-zarr': 'napari-ome-zarr', 'napari': 'napari builtins'} and pass to reading function e.g. `viewer.open(..., plugin=...)`.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/alobo/miniconda3/envs/napari-env/bin/napari", line 8, in <module>
    sys.exit(main())
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/__main__.py", line 564, in main
    _run()
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/__main__.py", line 340, in _run
    viewer._window._qt_viewer._qt_open(
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/_qt/qt_viewer.py", line 971, in _qt_open
    handle_gui_reading(filenames, self, stack, **kwargs)
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/_qt/dialogs/qt_reader_dialog.py", line 201, in handle_gui_reading
    open_with_dialog_choices(
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/_qt/dialogs/qt_reader_dialog.py", line 294, in open_with_dialog_choices
    qt_viewer.viewer.open(paths, stack=stack, plugin=plugin_name, **kwargs)
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/components/viewer_model.py", line 1092, in open
    self._add_layers_with_plugins(
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/components/viewer_model.py", line 1318, in _add_layers_with_plugins
    added.extend(self._add_layer_from_data(*_data))
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/components/viewer_model.py", line 1392, in _add_layer_from_data
    layer = add_method(data, **(meta or {}))
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/components/viewer_model.py", line 4, in add_labels
    import itertools
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/layers/labels/labels.py", line 283, in __init__
    data = self._ensure_int_labels(data)
  File "/home/alobo/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/layers/labels/labels.py", line 600, in _ensure_int_labels
    raise TypeError(
TypeError: Only integer types are supported for Labels layers, but data contains float64.
(napari-env) alobo@pop-os:/media/alobo/PortableSSD/CERTEC/CERTEC_20230623/RCERTEC_20230723$ 

napari: 0.4.18
Platform: Linux-6.6.10-76060610-generic-x86_64-with-glibc2.35
System: Pop!_OS 22.04 LTS
Python: 3.9.18 | packaged by conda-forge | (main, Dec 23 2023, 16:33:10) [GCC 12.3.0]
Qt: 5.15.2
PyQt5: 5.15.10
NumPy: 1.22.4
SciPy: 1.11.3
Dask: 2021.09.0
VisPy: 0.12.2
magicgui: 0.8.1
superqt: 0.6.1
in-n-out: 0.1.9
app-model: 0.2.4
npe2: 0.7.4

OpenGL:

  • GL version: 4.6 (Compatibility Profile) Mesa 23.3.2-1pop0170423832122.04~36f1d0e
  • MAX_TEXTURE_SIZE: 16384

Screens:

  • screen 1: resolution 1920x1080, scale 1.0
  • screen 2: resolution 1920x1080, scale 1.0

Settings path:

  • /home/alobo/.config/napari/napari-env_9feb76300df8ae00e4aee3e0c1622b87abfa148e/settings.yaml
@joshmoore
Copy link
Member

Hi @aloboa. Sorry that you're having trouble. Some of the older OME-Zarrs (e.g., v0.1) have differing data types. See #11, etc. If you try some of the newer files from https://idr.github.io/ome-ngff-samples they should work.

@aloboa
Copy link
Author

aloboa commented Feb 15, 2024

ok, I have found one of the most recent that works, but with messages to the console.
Should I just wait for further development of the plugin or is there something I can do to generate my own zarr files to be read by napari?

napari-env) alobo@pop-os:/media/alobo/PortableSSD/CERTEC/CERTEC_20230623/RCERTEC_20230723$ napari "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0048A/9846152.zarr/"
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
~/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/_qt/widgets/qt_dims_slider.py in mouseReleaseEvent(self=<napari._qt.widgets.qt_dims_slider.QtPlayButton object>, event=<PyQt5.QtGui.QMouseEvent object>)
    548             self.popup.show_above_mouse()
    549         elif event.button() == Qt.MouseButton.LeftButton:
--> 550             self._on_click()
        self._on_click = <bound method QtPlayButton._on_click of <napari._qt.widgets.qt_dims_slider.QtPlayButton object at 0x7fc27cd79f70>>
    551 
    552     def _on_click(self):

~/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/_qt/widgets/qt_dims_slider.py in _on_click(self=<napari._qt.widgets.qt_dims_slider.QtPlayButton object>)
    556             return None
    557         if self.property('playing') == "True":
--> 558             return qt_dims.stop()
        qt_dims.stop = <bound method QtDims.stop of <napari._qt.widgets.qt_dims.QtDims object at 0x7fc2dea4caf0>>
    559         self.play_requested.emit(self.axis)
    560         return None

~/miniconda3/envs/napari-env/lib/python3.9/site-packages/napari/_qt/widgets/qt_dims.py in stop(self=<napari._qt.widgets.qt_dims.QtDims object>)
    319         if self._animation_worker is not None:
    320             # Thread will be stop by the worker
--> 321             self._animation_worker._stop()
        self._animation_worker._stop = <bound method AnimationWorker._stop of <napari._qt.widgets.qt_dims_slider.AnimationWorker object at 0x7fc27003fca0>>
    322 
    323     @Slot()

~/miniconda3/envs/napari-env/lib/python3.9/site-packages/superqt/utils/_ensure_thread.py in _func(_max_args_=1, *args=(<napari._qt.widgets.qt_dims_slider.AnimationWorker object>,), **kwargs={})
    159         @wraps(func_)
    160         def _func(*args, _max_args_=max_args, **kwargs):
--> 161             thread = args[0].thread()  # self
        thread = undefined
        args.thread = undefined
    162             return _run_in_thread(
    163                 func_, thread, await_return, timeout, args[:_max_args_], kwargs

RuntimeError: wrapped C/C++ object of type AnimationWorker has been deleted

@psobolewskiPhD
Copy link
Contributor

psobolewskiPhD commented Feb 20, 2024

What triggers that traceback?
Using napari 0.4.19 and napari https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0048A/9846152.zarr/ it's slow but it does load. Are you hitting the play button? Or scrubbing the slider?

Edit: realistically for images like this you will need to wait for 0.5.0 and improved async slicing.

@aloboa
Copy link
Author

aloboa commented Feb 21, 2024

No traceback messages with 0.19, even clicking the play and arrow buttons.
Just after Exit, I get:

malloc_consolidate(): unaligned fastbin chunk detected
Aborted (core dumped)

but this always happens, even not having displayed any image.

@aloboa aloboa closed this as completed Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants