On Mar 29, 2007, at 7:04 PM, Sidnei da Silva wrote:

While doing a 'pack' on a Zope instance that is using multiple
databases, a KeyError 'n' happened. Upon investigation, we found out
that the 'oid_loaders' dictionary used by 'referencesf' (in
ZODB.serialize), which is in turn used by pack (presumably to find the
oids referenced by an object), doesn't have a loader registered for

A reference_type of 'n' means:

       Multi-database simple object reference.  The arguments consist
       of a databaase name, and an object id.

The ObjectReader class defined a few lines above 'referencesf' *does*
know how to load a multi-database simple object reference.

Now my question is, should 'referencesf' load those multi-database
references, or should they be treated just like the 'weak references',
by returning None, or should something else happen?

They should be treated as weak references, at least for now.

Or maybe that
reference shouldn't be there in the first place?

Where? There references should certainly be in the data records, otherwise, cross-database references wouldn't work at all.

This problem is preventing us from packing a database. It just falls
dead with the KeyError 'n' when packing.

What version of ZODB are you using?


Jim Fulton                      mailto:[EMAIL PROTECTED]                Python 
CTO                             (540) 361-1714                  
Zope Corporation        http://www.zope.com             http://www.zope.org

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to