Question: Exception When Using Remote_User.
9.8 years ago by
MORITA Hideyuki • 30
MORITA Hideyuki • 30 wrote:
Hi, The following error will occur under certain condition when using remote_user. AttributeError: 'NoneType' object has no attribute 'user' This error is thrown when: 1. using remote_user 2. browser has a valid session (cookie) 3. after logged in with an email address other than previously used This is caused by None value in prev_galaxy_session variable at L.231 in lib/galaxy/web/framework/__init__.py. I understand that galaxy_session instead of prev_galaxy_session should be referenced here. I created a patch to fix this problem by replacing prev_galaxy_session with galaxy_session. ====================================================================== ============= diff -r a4214de3752e lib/galaxy/web/framework/__init__.py +++ b/lib/galaxy/web/framework/__init__.py Mon Feb 16 13:31:02 2009 +0900 @@ -228,7 +228,7 @@ class UniverseWebTransaction( base.Defau invalidate_existing_session = True user_for_new_session = self.__get_or_create_remote_user( remote_user_email ) log.warning( "User logged in as '%s' externally, but has a cookie as '%s' invalidating session", - remote_user_email, prev_galaxy_session.user.email ) + remote_user_email, galaxy_session.user.email ) else: # No session exists, get/create user for new session user_for_new_session = self.__get_or_create_remote_user( remote_user_email ) ====================================================================== ============= Thanks. MORITA Hideyuki
ADD COMMENT • link •