ome / omero-figure

An OMERO.web app for creating Figures from images in OMERO
http://figure.openmicroscopy.org
GNU Affero General Public License v3.0
15 stars 30 forks source link

KeyError: 'pixel_size' on /figure/imgData/ID/ #347

Closed will-moore closed 8 months ago

will-moore commented 4 years ago

Seen on nightshade, with big image (5184 x 3456) where pyramid not complete, so probably just need to handle the error better?

Internal Server Error: /figure/imgData/4312991/
Traceback (most recent call last):
  File "/opt/omero/web/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/omero/web/OMERO.web/lib/python/omeroweb/decorators.py", line 486, in wrapped
    retval = f(request, *args, **kwargs)
  File "/opt/omero/web/venv/lib/python2.7/site-packages/omero_figure/views.py", line 94, in img_data_json
    rv['pixel_size']['valueX'] = px.getValue()
KeyError: 'pixel_size'
will-moore commented 2 years ago

Seen again on nightshade:

Traceback (most recent call last):

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/decorators.py", line 538, in wrapped
    retval = f(request, *args, **kwargs)

  File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero_figure/views.py", line 126, in img_data_json
    rv['pixel_size']['valueX'] = px.getValue()

KeyError: 'pixel_size'

<WSGIRequest: GET '/figure/imgData/4482641/?_=1638196962751'>
will-moore commented 2 years ago

Related error from nightshade:

File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/decorators.py" in wrapped
  538.                 retval = f(request, *args, **kwargs)

File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero_figure/views.py" in img_data_json
  130.         rv['pixel_size']['valueY'] = py.getValue()

Exception Type: AttributeError at /figure/imgData/4495653/
Exception Value: 'NoneType' object has no attribute 'getValue'
imagesc-bot commented 8 months ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/misleading-error-message-in-omero-figure/68642/4