Converting from old-style BTreess (was: [Zope-dev] To the brave folks ...)

Sidnei da Silva sidnei at awkly.org
Fri Dec 12 10:41:54 EST 2003


| I think that is true.  On the other hand, it was a bit of a surprise to
| find a BTree in ZGlobals.  Maybe they're hiding somewhere else, too.

At least, the script didn't found another one. It did found 7800
objects total, of which one was a BTree (ZGlobals).

Now, in 2.7 I get this output (starting zope via 'zopectl debug'):

>>> app
<Application instance at 414c8c80>
>>> app._p_jar
<Connection at 414ac74c>
>>> app._p_jar.root()
{'Application': <Application instance at 414c8c80>, 'ZGlobals':
<OOBTree object at 0x414d1c60>, 'RefreshData': {'auto': {'CCHS': 1},
'products': {'Archetypes': {'dependent_products': ('CCHS',)}}}}

Which looks sane to me. But if I copy the same Data.fs to another
instance with Zope HEAD, the "AttributeError: data" is there again. It
*seems* to me that the root PersistentMapping is not being unpickled
correctly.

> /var/src/zope/head/lib/python/ZODB/ZApplication.py(32)__init__()
-> conn=db.open()
(Pdb) n
> /var/src/zope/head/lib/python/ZODB/ZApplication.py(33)__init__()
-> root=conn.root()
(Pdb) n   
> /var/src/zope/head/lib/python/ZODB/ZApplication.py(34)__init__()
-> if not root.has_key(name):
(Pdb) print root
*** AttributeError: data
(Pdb) type(root)
<class 'Persistence.PersistentMapping.PersistentMapping'>
(Pdb) print conn.root()
*** AttributeError: data

-- 
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://plone.org/about/team#dreamcatcher

One person's error is another person's data.



More information about the Zope-Dev mailing list