OMERO figure fails when exporting as a new OMERO image

Hi @OMETeam,

A user just reported that his figure can be exported to PDF but not when exporting as a new OMERO image. I could reproduce it on both Chrome and Firefox.

Here is the error message

ERROR:omero.gateway:Failed to setPlane() on rawPixelsStore while creating Image
Traceback (most recent call last):
  File "/home/omeronas/OMERO.server/lib/python/omero/gateway/__init__.py", line 3797, in createImageFromNumpySeq
    uploadPlane(plane, theZ, theC, theT, dtype)
  File "/home/omeronas/OMERO.server/lib/python/omero/gateway/__init__.py", line 3779, in uploadPlane
    rawPixelsStore.setPlane(convertedPlane, z, c, t, self.SERVICE_OPTS)
  File "/home/omeronas/OMERO.server/lib/python/omero_api_RawPixelsStore_ice.py", line 1487, in setPlane
    return _M_omero.api.RawPixelsStore._op_setPlane.invoke(self, ((buf, z, c, t), _ctx))
InternalException: exception ::omero::InternalException
{
    serverStackTrace = ome.conditions.InternalException:  Wrapped Exception: (java.lang.UnsupportedOperationException):
Non-tile based writing unsupported.
	at ome.io.bioformats.BfPyramidPixelBuffer.setPlane(BfPyramidPixelBuffer.java:1117)
	at ome.services.RawPixelsBean.setPlane(RawPixelsBean.java:608)
	at sun.reflect.GeneratedMethodAccessor2810.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at ome.security.basic.EventHandler.invoke(EventHandler.java:154)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.tools.hibernate.SessionHandler.doStateful(SessionHandler.java:216)
	at ome.tools.hibernate.SessionHandler.invoke(SessionHandler.java:200)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at com.sun.proxy.$Proxy107.setPlane(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor2810.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at com.sun.proxy.$Proxy107.setPlane(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor2872.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:172)
	at ome.services.throttling.Callback.run(Callback.java:56)
	at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)
	at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:140)
	at ome.services.blitz.impl.RawPixelsStoreI.setPlane_async(RawPixelsStoreI.java:221)
	at sun.reflect.GeneratedMethodAccessor2871.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at omero.cmd.CallContext.invoke(CallContext.java:85)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at com.sun.proxy.$Proxy108.setPlane_async(Unknown Source)
	at omero.api._RawPixelsStoreTie.setPlane_async(_RawPixelsStoreTie.java:276)
	at omero.api._RawPixelsStoreDisp.___setPlane(_RawPixelsStoreDisp.java:1308)
	at omero.api._RawPixelsStoreDisp.__dispatch(_RawPixelsStoreDisp.java:1761)
	at IceInternal.Incoming.invoke(Incoming.java:221)
	at Ice.ConnectionI.invokeAll(ConnectionI.java:2536)
	at Ice.ConnectionI.dispatch(ConnectionI.java:1145)
	at Ice.ConnectionI.message(ConnectionI.java:1056)
	at IceInternal.ThreadPool.run(ThreadPool.java:395)
	at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832)
	at java.lang.Thread.run(Thread.java:748)

    serverExceptionClass = ome.conditions.InternalException
    message =  Wrapped Exception: (java.lang.UnsupportedOperationException):
Non-tile based writing unsupported.
}
Traceback (most recent call last):
  File "./script", line 2315, in <module>
    run_script()
  File "./script", line 2301, in run_script
    file_annotation = export_figure(conn, script_params)
  File "./script", line 2257, in export_figure
    return fig_export.build_figure()
  File "./script", line 965, in build_figure
    self.save_page(p)
  File "./script", line 2226, in save_page
    description=description, dataset=dataset)
  File "/home/omeronas/OMERO.server/lib/python/omero/gateway/__init__.py", line 3821, in createImageFromNumpySeq
    raise exc
omero.InternalException: exception ::omero::InternalException
{
    serverStackTrace = ome.conditions.InternalException:  Wrapped Exception: (java.lang.UnsupportedOperationException):
Non-tile based writing unsupported.
	at ome.io.bioformats.BfPyramidPixelBuffer.setPlane(BfPyramidPixelBuffer.java:1117)
	at ome.services.RawPixelsBean.setPlane(RawPixelsBean.java:608)
	at sun.reflect.GeneratedMethodAccessor2810.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at ome.security.basic.EventHandler.invoke(EventHandler.java:154)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.tools.hibernate.SessionHandler.doStateful(SessionHandler.java:216)
	at ome.tools.hibernate.SessionHandler.invoke(SessionHandler.java:200)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at com.sun.proxy.$Proxy107.setPlane(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor2810.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at com.sun.proxy.$Proxy107.setPlane(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor2872.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:172)
	at ome.services.throttling.Callback.run(Callback.java:56)
	at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)
	at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:140)
	at ome.services.blitz.impl.RawPixelsStoreI.setPlane_async(RawPixelsStoreI.java:221)
	at sun.reflect.GeneratedMethodAccessor2871.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
	at omero.cmd.CallContext.invoke(CallContext.java:85)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at com.sun.proxy.$Proxy108.setPlane_async(Unknown Source)
	at omero.api._RawPixelsStoreTie.setPlane_async(_RawPixelsStoreTie.java:276)
	at omero.api._RawPixelsStoreDisp.___setPlane(_RawPixelsStoreDisp.java:1308)
	at omero.api._RawPixelsStoreDisp.__dispatch(_RawPixelsStoreDisp.java:1761)
	at IceInternal.Incoming.invoke(Incoming.java:221)
	at Ice.ConnectionI.invokeAll(ConnectionI.java:2536)
	at Ice.ConnectionI.dispatch(ConnectionI.java:1145)
	at Ice.ConnectionI.message(ConnectionI.java:1056)
	at IceInternal.ThreadPool.run(ThreadPool.java:395)
	at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832)
	at java.lang.Thread.run(Thread.java:748)

    serverExceptionClass = ome.conditions.InternalException
    message =  Wrapped Exception: (java.lang.UnsupportedOperationException):
Non-tile based writing unsupported.
}

We’re still running OMERO 5.4.10, is this something that could be related to that ? (Upgrade is planned but no date yet).

Thanks a lot !

Hi @ Iguerard
To export the figure as a new image, a server-side script is run, so this is not a browser specific issue.
I have tried with the latest version of OMERO.figure on 5.6.2 server and I could not reproduce your issue. I have used figures with big images, projected image generated by iviewer and non-big images. So this is probably related to your version. To rule that out, could you indicate the type of images used in your figure?

Thanks

Jmarie

What is the paper size in figure? I think that setPlane() is probably failing because the new image is greater than 3k * 3k pixels in size, which may be reached by anything bigger than A4 size?

Your options are to use a smaller paper size in Figure, or export as TIFF or PNG and then import into OMERO and the server will then generate a tiled image.

Hope that helps,
Will.

1 Like

Hi both !

Thank you for your answers !

I just tested with a A4 format and it indeed worked. Is there any way to make it work with larger format or is A4 the max ?

Thanks !
Laurent

I created an issue to support export of bigger figures to OMERO at https://github.com/ome/omero-figure/issues/403 but I can’t say when we will have time to work on this.

Regards,
Will.

Ok thanks for the info ! :slight_smile:

Have a nice evening both !

Best,
Laurent

Final thought - Another work-around if you want to create big figures in OMERO is to export as a large TIFF image, then subsequently import that TIFF into OMERO (and OMERO will generate a tiled pyramid for the image). You won’t have the Figure info in the description etc, but otherwise this should work fine.

Will

1 Like