[Product-Developers] Need help fixing broken object

Hedley Roos hedley at upfrontsystems.co.za
Tue Dec 9 07:00:22 UTC 2008


>   Module Products.BTreeFolder2.BTreeFolder2, line 335, in has_key
> AttributeError: 'NoneType' object has no attribute 'has_key'
> 
> What can I do?

How about an external method?

def run(self):
     from BTrees.OOBTree import OOBTree
     setattr(obj, '_tree' , OOBTree())
     obj._p_changed = 1
     return 'done'

That will fix the None _tree variable. You may encounter a few other 
problems as well. Good luck!

Hedley




More information about the Product-Developers mailing list