[Zope] manage_clone gave KeyError: 'validate'

Lee Harr missive at hotmail.com
Fri Nov 7 18:04:18 EST 2003


Hi;

After upgrading from 2.4 to 2.6.1 one of my pages stopped working...
it is a DTML Method which calls a python script which calls manage_clone.

The error I was getting was in OFS/DTMLMethod.py ... something like:
KeyError: 'validate'

I can't get the exact message because... well. Here is what I did.

I changed OFS/DTMLMethod.py :

=====================================
# diff -u OFS/DTMLMethod.py.orig OFS/DTMLMethod.py
--- OFS/DTMLMethod.py.orig   Fri Nov  7 17:53:01 2003
+++ OFS/DTMLMethod.py Fri Nov  7 17:44:11 2003
@@ -132,7 +132,10 @@
         finally:
             security.removeContext(self)
             if first_time_through:
-                del self.__dict__['validate']
+                try:
+                    del self.__dict__['validate']
+                except KeyError:
+                    pass

         have_key=RESPONSE.headers.has_key
         if not (have_key('content-type') or have_key('Content-Type')):
==========================================


I restarted the server and my page started working again.

Then I decided to go back and get the exact error message to post
it here.... except now with the old file back in place it still works!

Strange.

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail




More information about the Zope mailing list