You shouldn't be getting this KeyError after restarting WebKit because WebKit is supposed to pickle your sessions to disk when it shuts down, and load your sessions back in from disk when they are requested after it starts back up.
Perhaps you're storing something in your session that isn't pickleable? After you shut down WebKit, look in the Sessions directory and see if there is a file with a name like "20030127151726-0e2ad517c9ecba9aebe94731a322ea53.ses" in there. There should be. Also, if you're not using Webware 0.8b1, you might want to upgrade to it, because I think the handling of session pickling errors has improved over previous releases. - Geoff > -----Original Message----- > From: Garry Hodgson [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 27, 2003 3: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