Which version of Webware are you using? >From the looks of the trace back you provided, it appears the problem is that the decoding of the serialized session on the disk is failing, rather than the session is missing.
This can be caused by having non-serializable objects in the Session object. Until recently, the problem would show up just like this, because the pickled session object was corrupted since the entire object could not be stored. The current behavior (as of 0.8b1) is to display an error when trying to pickle the session out to disk, and to not store a corrupted session on disk. The error goes through the Application.handleException() method which by default will print the message to stdout. Note you won't see the pickling exception in your browser because there is no session associated with the error. If you are using 0.8b1, please let me know, as there must be some other problem. But generally I suspect your problem is that you have something in the session object which can't be pickled like an open file or database connection. -Stuart- > -----Original Message----- > From: Garry Hodgson [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 27, 2003 12:35 PM > To: [EMAIL PROTECTED] > Subject: [Webware-discuss] how do i prevent a KeyError on session id > when i restart? > > > > if i've got a browser using a webkit app, then restart webkit, > the next request from the browser generates an error: > > WebKit caught an exception while processing a request for > "/usr/local/Webware7/WebKit/SpaceWeb/Application.py" at Mon Jan 27 > 15:23:52 2003 (timestamp: 1043699032.69). The plain text > traceback from > Python is printed below and the full HTML error report from WebKit is > attached. > > Traceback (most recent call last): > File "./WebKit/Application.py", line 368, in dispatchRequest > elif self.isSessionIdProblematic(request): > File "./WebKit/Application.py", line 466, in isSessionIdProblematic > if (time()-request.session().lastAccessTime()) >= > request.session().timeout(): > File "./WebKit/HTTPRequest.py", line 225, in session > return self._transaction.session() > File "./WebKit/Transaction.py", line 67, in session > self._session = > self._application.createSessionForTransaction(self) > File "./WebKit/Application.py", line 889, in > createSessionForTransaction > session = self.session(sessId) > File "./WebKit/Application.py", line 725, in session > return self._sessions[sessionId] > File "./WebKit/SessionDynamicStore.py", line 72, in __getitem__ > self.MovetoMemory(key) > File "./WebKit/SessionDynamicStore.py", line 135, in MovetoMemory > self._memoryStore[key] = self._fileStore[key] > File "./WebKit/SessionFileStore.py", line 55, in __getitem__ > raise KeyError, key > KeyError: 20030127151726-0e2ad517c9ecba9aebe94731a322ea53 > > so presumably the old session cookie is no longer valid. can this be > caught and handle more gracefully? > > thanks > > -- > Garry Hodgson Those who would give up essential > liberty > Senior Hacker to purchase a little temporary safety > Software Innovation Services deserve neither liberty nor safety. > AT&T Labs > [EMAIL PROTECTED] - Benjamin Franklin, 1775 > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Webware-discuss mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/webware-discuss > ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss