Closed will-moore closed 6 months ago
I have removed renamed a file in ManagedRepo and then opened the image in iviewer.
I get
With an image without pyramids I get
Interestingly, on Preview, there is no warning either (I realize this is for another PR) but it would be useful too, cf https://www.openmicroscopy.org/qa2/qa/feedback/41603/
How to elicit no channel data loaded
error ?
The no channel data
is designed to handle the response returned from https://github.com/ome/omero-web/blob/e1b1355ebd4f9de8b855dd2c55f59d86c061a81b/omeroweb/webgateway/marshal.py#L257
The code comment says Will happen if an image has bad or missing pixel data
but I don't know if that's still true or how to trigger it.
I can create that exception by adding test = "fail" + 1
into the try/except block above:
With that last commit, we try to load the omero.server.nodedescriptors
config from the server.
If we can load it and it is set and it doesn't contain "PixelData", then we know that pyramid creation is disabled and the error with ConcurrencyException
should look like this (EDIT: updated to include the commit below):
Otherwise it's probable that we can generate pyramids (unless this is disabled on an older server that doesn't allow us to query it), so we show this:
With a "large" image without pyramids, I am having the two messages if pyramid gen is a) disabled (first screenshot) or b) enabled (second screenshot). Lgtm
I understand that https://github.com/ome/omero-iviewer/pull/474#issuecomment-2079684660 is very hard to elicit and was never encountered, actually the error is being caught for completeness sake.
Lgtm in total.
Fixes #473
This improves the error handling for loading image data when you first open iviewer.
Previously we only handled
404 Image not found
, but if any JSON data was returned, even with exceptions, then these were ignored and the viewer would silently fail.I have handled the possible Errors etc that are reported by the python error handling at various stages, such as ConcurrencyException and other catch-all exceptions:
To test, you need to generate or find broken images (or missing pyramids etc).
Most of the testing I've done has been by artificially adding errors at particular points in the python code.