Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #5894 (closed)

Opened 13 years ago

Closed 13 years ago

Bug: TypeError in OMEROWeb.log

Reported by: jamoore Owned by: wmoore
Priority: major Milestone: OMERO-Beta4.3.2
Component: Web Version: n.a.
Keywords: n.a. Cc: atarkowska, cneves
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-07-21 (1)

Description

Mon, 13 Jun 2011 15:09:49 blitz_gateway 8048 ERROR    Traceback (most recent call last):
 File "c:\omero-current\lib\python\omero\gateway\__init__.py", line 5317, in getThumbnail
   return self._getProjectedThumbnail(size, pos)
 File "c:\omero-current\lib\python\omero\gateway\__init__.py", line 4803, in wrapped
   return func(self, *args, **kwargs)
 File "c:\omero-current\lib\python\omero\gateway\__init__.py", line 5257, in _getProjectedThumbnail
   img = self.renderImage(z,t)
 File "c:\omero-current\lib\python\omero\gateway\__init__.py", line 5856, in renderImage
   rv = self.renderJpeg(z,t,compression)
 File "c:\omero-current\lib\python\omero\gateway\__init__.py", line 4803, in wrapped
   return func(self, *args, **kwargs)
 File "c:\omero-current\lib\python\omero\gateway\__init__.py", line 5656, in renderJpeg
   self._pd.z = long(z)
TypeError: long() argument must be a string or a number, not 'NoneType'

Change History (9)

comment:1 Changed 13 years ago by jburel

  • Milestone changed from OMERO-Beta4.3 to OMERO-Beta4.3.1
  • Sprint changed from 2011-06-16 (14) to 2011-06-30 (1)

Moved from sprint 2011-06-16 (14)

comment:2 Changed 13 years ago by wmoore

Not sure how to reproduce this. Tried viewing thumbnails during import, but get a different error:

Mon, 27 Jun 2011 13:33:23 blitz_gateway DEBUG    omero.ResourceError on safeCallWrap resetDefaults((),{})
Mon, 27 Jun 2011 13:33:24 blitz_gateway DEBUG    Traceback (most recent call last):
  File "/Users/will/Desktop/OMERO/dist/lib/python/omero/gateway/__init__.py", line 2885, in inner
    return f(*args, **kwargs)
  File "/Users/will/Desktop/OMERO/dist/lib/python/omero_api_ThumbnailStore_ice.py", line 184, in resetDefaults
    return _M_omero.api.ThumbnailStore._op_resetDefaults.invoke(self, ((), _ctx))
ResourceError: exception ::omero::ResourceError
{
    serverStackTrace = ome.conditions.ResourceError: Pixels set is missing statistics for channel '0'. This suggests an image import error or failed image import.
	at omeis.providers.re.metadata.StatsFactory.computeLocationStats(StatsFactory.java:246)
	at ome.logic.RenderingSettingsImpl.computeLocationStats(RenderingSettingsImpl.java:883)
	at ome.logic.RenderingSettingsImpl.resetChannelBindings(RenderingSettingsImpl.java:814)
	at ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:573)
	at ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:489)
	at ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:1306)
	at ome.services.ThumbnailBean._resetDefaults(ThumbnailBean.java:1262)
	at ome.services.ThumbnailBean.resetDefaults(ThumbnailBean.java:1232)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	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:150)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.tools.hibernate.SessionHandler.doStateful(SessionHandler.java:182)
	at ome.tools.hibernate.SessionHandler.invoke(SessionHandler.java:166)
	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:231)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy78.resetDefaults(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	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:83)
	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 $Proxy78.resetDefaults(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:179)
	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:136)
	at ome.services.blitz.impl.ThumbnailStoreI.resetDefaults_async(ThumbnailStoreI.java:135)
	at omero.api._ThumbnailStoreTie.resetDefaults_async(_ThumbnailStoreTie.java:176)
	at omero.api._ThumbnailStoreDisp.___resetDefaults(_ThumbnailStoreDisp.java:565)
	at omero.api._ThumbnailStoreDisp.__dispatch(_ThumbnailStoreDisp.java:695)
	at IceInternal.Incoming.invoke(Incoming.java:159)
	at Ice.ConnectionI.invokeAll(ConnectionI.java:2037)
	at Ice.ConnectionI.message(ConnectionI.java:972)
	at IceInternal.ThreadPool.run(ThreadPool.java:577)
	at IceInternal.ThreadPool.access$100(ThreadPool.java:12)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)

    serverExceptionClass = ome.conditions.ResourceError
    message = Pixels set is missing statistics for channel '0'. This suggests an image import error or failed image import.
}

Mon, 27 Jun 2011 13:33:24 blitz_gateway DEBUG    wrapped resetDefaults
Mon, 27 Jun 2011 13:33:24 blitz_gateway DEBUG    {'serverExceptionClass': 'ome.conditions.ResourceError', 'serverStackTrace': "ome.conditions.ResourceError: Pixels set is missing statistics for channel '0'. This suggests an image import error or failed image import.\n\tat omeis.providers.re.metadata.StatsFactory.computeLocationStats(StatsFactory.java:246)\n\tat ome.logic.RenderingSettingsImpl.computeLocationStats(RenderingSettingsImpl.java:883)\n\tat ome.logic.RenderingSettingsImpl.resetChannelBindings(RenderingSettingsImpl.java:814)\n\tat ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:573)\n\tat ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:489)\n\tat ome.logic.RenderingSettingsImpl.resetDefaults(RenderingSettingsImpl.java:1306)\n\tat ome.services.ThumbnailBean._resetDefaults(ThumbnailBean.java:1262)\n\tat ome.services.ThumbnailBean.resetDefaults(ThumbnailBean.java:1232)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n\tat java.lang.reflect.Method.invoke(Method.java:592)\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)\n\tat ome.security.basic.EventHandler.invoke(EventHandler.java:150)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)\n\tat ome.tools.hibernate.SessionHandler.doStateful(SessionHandler.java:182)\n\tat ome.tools.hibernate.SessionHandler.invoke(SessionHandler.java:166)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)\n\tat org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)\n\tat ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:231)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)\n\tat ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)\n\tat org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)\n\tat $Proxy78.resetDefaults(Unknown Source)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n\tat java.lang.reflect.Method.invoke(Method.java:592)\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)\n\tat ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:83)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)\n\tat ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)\n\tat org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)\n\tat $Proxy78.resetDefaults(Unknown Source)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\n\tat java.lang.reflect.Method.invoke(Method.java:592)\n\tat ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:179)\n\tat ome.services.throttling.Callback.run(Callback.java:56)\n\tat ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)\n\tat ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:136)\n\tat ome.services.blitz.impl.ThumbnailStoreI.resetDefaults_async(ThumbnailStoreI.java:135)\n\tat omero.api._ThumbnailStoreTie.resetDefaults_async(_ThumbnailStoreTie.java:176)\n\tat omero.api._ThumbnailStoreDisp.___resetDefaults(_ThumbnailStoreDisp.java:565)\n\tat omero.api._ThumbnailStoreDisp.__dispatch(_ThumbnailStoreDisp.java:695)\n\tat IceInternal.Incoming.invoke(Incoming.java:159)\n\tat Ice.ConnectionI.invokeAll(ConnectionI.java:2037)\n\tat Ice.ConnectionI.message(ConnectionI.java:972)\n\tat IceInternal.ThreadPool.run(ThreadPool.java:577)\n\tat IceInternal.ThreadPool.access$100(ThreadPool.java:12)\n\tat IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:971)\n"}
Mon, 27 Jun 2011 13:33:24 blitz_gateway DEBUG    exception caught, first time we back off for 10 secs

comment:3 Changed 13 years ago by jmoore

My guess, Will, would be that this is causing it:

    def _getProjectedThumbnail (self, size, pos):
        """
        Returns a string holding a rendered JPEG of the projected image, sized to mimic a thumbnail.
        This is an 'internal' method of this class, used to generate a thumbnail from a full-sized 
        projected image (since thumbnails don't support projection). SetProjection should be called 
        before this method is called, so that this returns a projected, scaled image.
        
        @param size:    The length of the longest size, in a list or tuple. E.g. (100,)
        @type size:     list or tuple
        @param pos:     The (z, t) position
        @type pos:      Tuple (z,t)
        """
        
        if pos is None:
            t = z = None
        else:
            z, t = pos
        img = self.renderImage(z,t)

comment:4 Changed 13 years ago by wmoore

  • Milestone changed from OMERO-Beta4.3.1 to OMERO-Beta4.3.2
  • Sprint 2011-07-07 (1) deleted

comment:5 Changed 13 years ago by wmoore

  • Sprint set to 2011-07-21 (1)

comment:6 Changed 13 years ago by wmoore

Not sure that _getProjectedThumbnail is the cause of the problem, since setProjected should always be called before this. However, I guess it shouldn't hurt to use Z = T = 0 instead of None here, to be sure of avoiding the npe.

comment:7 Changed 13 years ago by jmoore

If renderImage can't take None's, then t = z = None definitely seems like a bad thing to do.

comment:8 Changed 13 years ago by wmoore

  • Status changed from new to accepted

comment:9 Changed 13 years ago by Will Moore <will@…>

  • Remaining Time set to 0
  • Resolution set to fixed
  • Status changed from accepted to closed

(In [7154b3a81e2c742acf651c52f9b02ba55ad06149/ome.git] on branch develop) Blitz gateway getProjectedThumbnail uses t = z = 0. Closes #5894

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.70077 sec.)

We're Hiring!