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 #5684 (closed)

Opened 8 years ago

Closed 8 years ago

BUG: Changing group thrown exception

Reported by: atarkowska Owned by: cneves
Priority: major Milestone: OMERO-Beta4.3
Component: Web Version: n.a.
Keywords: n.a. Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-06-16 (14)

Description (last modified by jmoore)

Exception Type: 	AttributeError
Exception Value: 	

'NoneType' object has no attribute 'id'

Exception Location: 	/Users/ola/Dev/omero/components/tools/OmeroWeb/omeroweb/../omeroweb/webclient/views.py in change_active_group, line 419

Change History (8)

comment:1 Changed 8 years ago by jburel

  • Sprint changed from 2011-06-02 (13) to 2011-06-16 (14)

Moved from sprint 2011-06-02 (13)

comment:2 Changed 8 years ago by jmoore

  • Component changed from General to Web
  • Description modified (diff)
  • Priority changed from minor to major

comment:3 Changed 8 years ago by wmoore

I've seen this once but NOT reproducible.

comment:4 follow-up: Changed 8 years ago by jmoore

  • Owner changed from atarkowska to cneves-x

The only use of ".id" I see in that method is:

def change_active_group(request, **kwargs):
    ... 
    blitz = settings.SERVER_LIST.get(pk=server) 
    request.session['server'] = blitz.id

which sounds oddly like something that Carlos was looking into, where the server configuration could get lost. I'm passing to Carlos so he can check if this is related.

comment:5 Changed 8 years ago by cneves

Unrelated to the issue itself: the use of change_active_group is redundant with the following methods on the connection object, as defined in omero.gateway;

    def setGroupNameForSession (self, group):
        """
        Looks up the group by name, then delegates to L{setGroupForSession}, returning the result
        
        @param group:       Group name
        @type group:        String
        @return:            True if group set successfully
        @rtype:             Boolean
        """

    def setGroupForSession (self, groupid):
        """
        Sets the security context of this connection to the specified group
        
        @param groupid:     The ID of the group to switch to
        @type groupid:      Long
        @rtype:             Boolean
        @return:            True if the group was switched successfully
        """

    def revertGroupForSession (self):
        """ Switches the group to the previous group """

comment:6 in reply to: ↑ 4 ; follow-up: Changed 8 years ago by cneves

Replying to jmoore:

which sounds oddly like something that Carlos was looking into, where the server configuration could get lost. I'm passing to Carlos so he can check if this is related.

Indeed, given the multithreaded access to the worker, there is always a slight chance that the sqlite db is locked for reading, which would certainly result in errors like this one. I couldn't find anything else that could obviously trigger this issue, but I'll wait for tomorrow's test of the thread locked worker before closing this ticker.

comment:7 in reply to: ↑ 6 Changed 8 years ago by atarkowska

Replying to cneves-x:

Replying to jmoore:

which sounds oddly like something that Carlos was looking into, where the server configuration could get lost. I'm passing to Carlos so he can check if this is related.

Indeed, given the multithreaded access to the worker, there is always a slight chance that the sqlite db is locked for reading, which would certainly result in errors like this one. I couldn't find anything else that could obviously trigger this issue, but I'll wait for tomorrow's test of the thread locked worker before closing this ticker.

We no longer use sqlite db (was redundant over a year ago) and there is not chance to lock it ;-). The issue might come from the fact that either session didn't store server id or was removed for some reason

    server = request.session.get('server')
    ...
       
    webgateway_views._session_logout(request, request.session.get('server'))
    
    blitz = settings.SERVER_LIST.get(pk=server) 

comment:8 Changed 8 years ago by atarkowska

  • Remaining Time changed from 0.2 to 0
  • Resolution set to worksforme
  • Status changed from new to closed

I can;t reproduce it.

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.86023 sec.)

We're Hiring!