[Product-Developers] Re: Need help fixing broken object

Johannes Schwenk johannes.schwenk at gmail.com
Fri Dec 12 08:09:34 UTC 2008


Thanks both of you, but it didn't work.

I will have to do further observations as to what extend this is an reoccuring 
problem. Right now I can live with the stale object, cause its on a 
development machine.

Thanks again!
Johannes Schwenk

Am Donnerstag, 11. Dezember 2008 11:52:48 schrieb Maurits van Rees:
> Hedley Roos, on 2008-12-09:
> >>   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!
>
> Poi has similar migration code.  See the two classes at the top here:
>
> http://svn.plone.org/svn/collective/Products.Poi/trunk/Products/Poi/migrati
>on.py
>
> I did not write that part of the code though, so I don't know details.






More information about the Product-Developers mailing list