Error while browsing pyramid dataset
See original GitHub issueš Bug
I was panning and zooming around the IDR COVID gut dataset, minding my own business, when BAM! This happened:
File "/home/jni/miniconda3/envs/f7/lib/python3.7/site-packages/vispy/app/backends/_qt.py", line 825, in paintGL
self._vispy_canvas.events.draw(region=None)
File "/home/jni/miniconda3/envs/f7/lib/python3.7/site-packages/vispy/util/event.py", line 455, in __call__
self._invoke_callback(cb, event)
File "/home/jni/miniconda3/envs/f7/lib/python3.7/site-packages/vispy/util/event.py", line 475, in _invoke_callback
self, cb_event=(cb, event))
File "/home/jni/miniconda3/envs/f7/lib/python3.7/site-packages/vispy/util/event.py", line 471, in _invoke_callback
cb(event)
File "/home/jni/projects/napari/napari/_vispy/vispy_base_layer.py", line 246, in on_draw
shape_threshold=self.node.canvas.size,
File "/home/jni/projects/napari/napari/layers/base/base.py", line 692, in _update_multiscale
self.data_level = data_level
File "/home/jni/projects/napari/napari/layers/image/image.py", line 291, in data_level
self.refresh()
File "/home/jni/projects/napari/napari/layers/base/base.py", line 633, in refresh
self.events.set_data()
File "/home/jni/projects/napari/napari/utils/event.py", line 508, in __call__
self._invoke_callback(cb, event)
File "/home/jni/projects/napari/napari/utils/event.py", line 529, in _invoke_callback
cb_event=(cb, event),
File "/home/jni/projects/napari/napari/utils/event.py", line 523, in _invoke_callback
cb(event)
File "/home/jni/projects/napari/napari/_vispy/vispy_image_layer.py", line 73, in _on_data_change
data = self.downsample_texture(data, self.MAX_TEXTURE_SIZE_2D)
File "/home/jni/projects/napari/napari/_vispy/vispy_image_layer.py", line 167, in downsample_texture
f"Shape of individual tiles in multiscale {data.shape} "
ValueError: Shape of individual tiles in multiscale (1, 19840) cannot exceed GL_MAX_TEXTURE_SIZE 16384. Rendering is currently in 2D mode.
To Reproduce
Steps to reproduce the behavior:
- Download the dataset using the code below
- Open it in napari using the next chunk of code
- pan and zoom for a while
Honestly, Iām not clear on step 3, because everything worked great for a few minutes. I donāt know under what circumstances this error gets actually triggered.
Code to download data (courtesy of @joshmoore):
import requests
import dask.array as da
from dask.diagnostics import ProgressBar
path = 'https://s3.embassy.ebi.ac.uk/idr/zarr/v0.1/9822151.zarr'
try:
datasets = [x['path'] for x in
requests.get(f'{path}/.zattrs').json()["multiscales"][0]["datasets"]]
except KeyError:
datasets = ["0"]
resolutions = [da.from_zarr(path, component=str(i)) for i in datasets]
levels = list(range(len(resolutions)))
pbar = ProgressBar()
for level, data in reversed(list(zip(levels, resolutions))):
with pbar:
data.to_zarr(f'/path/to/data/covid-gut/{level}.zarr')
Itās ~28GB so be prepared to wait. Took about 10h for me, most of which comes from the two highest levels.
Code to view in napari:
import napari
localres = [
da.from_zarr(f'/path/to/data/covid-gut/{level}.zarr')
for level in range(len(resolutions))
]
with napari.gui_qt():
v = napari.view_image(localres)
Expected behavior
Should just keep working like itās nothing.
Environment
napari: 0.2.12+98.g0f94ec10
Platform: Linux-4.15.0-29-generic-x86_64-with-debian-buster-sid
Python: 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 21:52:21) [GCC 7.3.0]
Qt: 5.13.0
PyQt5: 5.13.1
NumPy: 1.18.3
SciPy: 1.3.1
Dask: 2.15.0
VisPy: 0.6.4
GL version: 3.0 Mesa 19.2.8
MAX_TEXTURE_SIZE: 16384
Plugins:
- napari-plugin-engine: 0.1.4
- napari-plugins: 0.1.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (7 by maintainers)
Top Results From Across the Web
00244: Raster data source does not have pyramidsāArcGIS Pro
You are sharing a scene that includes a new web elevation layer. The elevation source is a raster dataset that either does not...
Read more >Advice on Pyramid views exception handling - Stack Overflow
I applied this strategy to ToDoPyramid and could encapsulate error handling in a single custom exception view that was repeated multipleĀ ...
Read more >Unable to rerun the Build Pyramids tool after the connection is ...
Cause. The pyramids or file geodatabase may have become corrupt as the tool failed while processing the raster datasets. Solution or Workaround.
Read more >Pyramid 2020.25 Released - Product Announcements
As such, Pyramid recommends that the new release be tested on a duplicate version of an existing content database repository before anyĀ ...
Read more >A study of pyramid structure for code correction - OpenBU
We apply the models to the code correction task on Juliet Test Suite for C/C++ and Java of Software Assurance Reference Dataset (SARD),Ā ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @joshmoore! Yeah I downloaded the datasets willy nilly which is why things were only half working. But my incompetence helped us uncover some bugs in how we handle plugins! =D
See https://github.com/ome/ome-zarr-py/pull/8