On Apr 28, 1:59 am, Ben Bangert <[EMAIL PROTECTED]> wrote: > What's the other exception that is occurring?
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'userInfo' happens if you have a pickled object (in my case, a simple object called userInfo ) in your session, but change your code around and either migrate or remove the class some might think this is an edge case... i don't really. personally, i would like instances like this to either invalidate the session or the appropriate object -- i can imagine/fear upgrading a production site and changing some session caching information around -- then causing tons of errors. to recreate: in your base controller's before, add a line like this: if 'user_info' not in session: session.user_info= userInfo() and add this class: class userInfo(object): id = None email = None if you remove userInfo / migrate it to helpers.py / rename it /or whatever.... beaker will cause a fatal error when you test "if 'user_info' not in session", because the unpickling fails. i really think a supported, if not default, behavior should be to invalidate the attempted session and create a new session. Full trace- ------------------ File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/Paste-1.4.2-py2.5.egg/paste/registry.py', line 160 in __contains__ return key in self._current_obj() File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/Beaker-0.7.5-py2.5.egg/beaker/session.py', line 320 in __contains__ return self._session().has_key(key) File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/Beaker-0.7.5-py2.5.egg/beaker/session.py', line 291 in _session self.__dict__['_sess'] = Session(req, use_cookies=True, **params) File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/Beaker-0.7.5-py2.5.egg/beaker/session.py', line 104 in __init__ self.invalidate() File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/Beaker-0.7.5-py2.5.egg/beaker/session.py', line 167 in invalidate namespace.acquire_write_lock() File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/Beaker-0.7.5-py2.5.egg/beaker/container.py', line 144 in acquire_write_lock if (wait or r): self.open('c', checkcount = True) File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/Beaker-0.7.5-py2.5.egg/beaker/container.py', line 172 in open if self.openers == 0: self.do_open(flags) File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ site-packages/Beaker-0.7.5-py2.5.egg/beaker/container.py', line 715 in do_open self.hash = cPickle.load(fh) AttributeError: 'module' object has no attribute 'userInfo' --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---