Re: Upgrade (to 0.9.2) fails with _p_jar
Jan-Wijbrand Kolman <[email protected]>
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Organization | Infrae |
| Message-ID | <[email protected]> |
Benno Luthiger wrote: > Dear list members > > I'm testing our upgrade procedure, which integrates all steps from Silva > 0.9.1 to 1.0, with different sites. > The upgrade of a big site fails in the first step (to Silva 0.9.2) with the > following error: > AttributeError: _p_jar > > The relevant stack trace is: > File "/opt/ZOPE/ZOPESITES/UPGRADE/TEST_IDSITES/Products/Silva/upgrade.py", > line 305, in upgrade_using_registry > if obj._p_jar is not None: > > The object the failure happens is: > .../silva_ethz/ETH/id_sites/wcms/wcms/people/olafa/index/0/child%2C0%2C9 > That seems to be a node in the version 0, i.e. a ParsedXML object. > > Any ideas? I indeed do recognize this attribute error when working on the upgrade procedures. I also remember having to add an getattr check for this _p_jar here and there (in code which might touch ParsedXML objects). AFAIK (it is all a bit fuzzy to me too) the _p_jar attributes are part of the persistence machinery of Zope/ZODB. Sometimes objects do not (yet) have this attr. depending on the state of the transaction at that point. Uhm, I'd need a bit more investigation time into the code you mention in the stack trace to have a reasonable suggestion. For the time being you might just change this line 305 into something like: if getattr(obj, '_p_jar', None) and obj._p_jar is not None: ...and see if the upgrade now continues succesfully. HTH regards jw -- Jan-Wijbrand Kolman [email protected]