ome / omero-scripts

Core OMERO Scripts
https://pypi.org/project/omero-scripts/
12 stars 32 forks source link

Error while exporting ROI #207

Open Mohammedhusen opened 1 year ago

Mohammedhusen commented 1 year ago

Dear Team,

Hope you are doing well.

while exporting ROI we are getting below error in the version "OMERO.web 5.16.0." , could you please help us to resolve this error?

This method cannot handle tiled images yet. roi_export_error.txt

Regards, Mohammedhusen Khatib

will-moore commented 1 year ago

Hi, I'm just going to put the stack trace here in a details block to make it easier for others to read:

ome.conditions.ApiUsageException ``` WARNING:omero.gateway:ApiUsageException on to <5cb3e25b-9cb3-4b2d-8cbd-b49f484a158bomero.api.IRoi> getShapeStatsRestricted(([8], 0, 0, [0, 1, 2]), {}) Traceback (most recent call last): File "/opt/omero/server/venv3/lib/python3.8/site-packages/omero/gateway/__init__.py", line 4856, in __call__ return self.f(*args, **kwargs) File "/opt/omero/server/venv3/lib/python3.8/site-packages/omero_api_IRoi_ice.py", line 826, in getShapeStatsRestricted return _M_omero.api.IRoi._op_getShapeStatsRestricted.invoke(self, ((shapeIdList, zForUnattached, tForUnattached, channels), _ctx)) omero.ApiUsageException: exception ::omero::ApiUsageException { serverStackTrace = ome.conditions.ApiUsageException: This method cannot handle tiled images yet. at ome.services.roi.GeomTool.getStatsRestricted(GeomTool.java:415) at ome.services.blitz.impl.RoiI$8.doWork(RoiI.java:260) at jdk.internal.reflect.GeneratedMethodAccessor292.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:568) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.security.basic.EventHandler.invoke(EventHandler.java:154) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy81.doWork(Unknown Source) at ome.services.util.Executor$Impl.execute(Executor.java:447) at ome.services.util.Executor$Impl.execute(Executor.java:392) at ome.services.throttling.Adapter.run(Adapter.java:50) at ome.services.throttling.InThreadThrottlingStrategy.runnableCall(InThreadThrottlingStrategy.java:89) at ome.services.blitz.impl.AbstractAmdServant.runnableCall(AbstractAmdServant.java:154) at ome.services.blitz.impl.RoiI.getShapeStatsRestricted_async(RoiI.java:252) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at omero.cmd.CallContext.invoke(CallContext.java:85) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy111.getShapeStatsRestricted_async(Unknown Source) at omero.api._IRoiTie.getShapeStatsRestricted_async(_IRoiTie.java:148) at omero.api._IRoiDisp.___getShapeStatsRestricted(_IRoiDisp.java:436) at omero.api._IRoiDisp.__dispatch(_IRoiDisp.java:657) 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.base/java.lang.Thread.run(Thread.java:829) serverExceptionClass = ome.conditions.ApiUsageException message = This method cannot handle tiled images yet. } Traceback (most recent call last): File "./script", line 419, in run_script() File "./script", line 402, in run_script result = batch_roi_export(conn, script_params) File "./script", line 332, in batch_roi_export for row in get_export_data(conn, script_params, image, units): File "./script", line 114, in get_export_data stats = roi_service.getShapeStatsRestricted( File "/opt/omero/server/venv3/lib/python3.8/site-packages/omero/gateway/__init__.py", line 4859, in __call__ return self.handle_exception(e, *args, **kwargs) File "/opt/omero/server/venv3/lib/python3.8/site-packages/omero/gateway/__init__.py", line 4856, in __call__ return self.f(*args, **kwargs) File "/opt/omero/server/venv3/lib/python3.8/site-packages/omero_api_IRoi_ice.py", line 826, in getShapeStatsRestricted return _M_omero.api.IRoi._op_getShapeStatsRestricted.invoke(self, ((shapeIdList, zForUnattached, tForUnattached, channels), _ctx)) omero.ApiUsageException: exception ::omero::ApiUsageException { serverStackTrace = ome.conditions.ApiUsageException: This method cannot handle tiled images yet. at ome.services.roi.GeomTool.getStatsRestricted(GeomTool.java:415) at ome.services.blitz.impl.RoiI$8.doWork(RoiI.java:260) at jdk.internal.reflect.GeneratedMethodAccessor292.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:568) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.security.basic.EventHandler.invoke(EventHandler.java:154) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy81.doWork(Unknown Source) at ome.services.util.Executor$Impl.execute(Executor.java:447) at ome.services.util.Executor$Impl.execute(Executor.java:392) at ome.services.throttling.Adapter.run(Adapter.java:50) at ome.services.throttling.InThreadThrottlingStrategy.runnableCall(InThreadThrottlingStrategy.java:89) at ome.services.blitz.impl.AbstractAmdServant.runnableCall(AbstractAmdServant.java:154) at ome.services.blitz.impl.RoiI.getShapeStatsRestricted_async(RoiI.java:252) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at omero.cmd.CallContext.invoke(CallContext.java:85) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) at com.sun.proxy.$Proxy111.getShapeStatsRestricted_async(Unknown Source) at omero.api._IRoiTie.getShapeStatsRestricted_async(_IRoiTie.java:148) at omero.api._IRoiDisp.___getShapeStatsRestricted(_IRoiDisp.java:436) at omero.api._IRoiDisp.__dispatch(_IRoiDisp.java:657) 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.base/java.lang.Thread.run(Thread.java:829) serverExceptionClass = ome.conditions.ApiUsageException message = This method cannot handle tiled images yet. } ```

The main issue here is that a "tiled" image could be very large, and the server wants to avoid having to calculate pixel stats on a massive area. Are your ROIs themselves very big? E.g. 1k x 1k or smaller? What kind of shapes are they? Ellipse, Rectangle etc?

Possible options: