[ZODB-Dev] Wierd ZODB error (message)

Tim Peters tim at zope.com
Fri Aug 8 14:37:50 EDT 2003


[Andreas Jung]
> in some rare cases I get the following error from a Zope product
> (Python 2.2.3, Zope 2.6.1).
>
>
> Traceback (innermost last):
>
>     * Module ZPublisher.Publish, line 123, in publish
>     * Module ZPublisher.mapply, line 88, in mapply
>     * Module ZPublisher.Publish, line 59, in call_object
>     * Module Products.HRSBauplanEditor2.ZBauplanToolbox, line 177, in
> prepareCheckout
>     * Module Products.HRSBauplanEditor2.ZBauplanToolbox, line 242, in
> checkoutBauplan
>     * Module Products.HRSBauplanEditor2.ZIDManager, line 79, in
> getIterator
>     * Module Products.HRSBauplanEditor2.ZIDManager, line 27, in
> __init__
>     * Module ZODB.Connection, line 582, in setstate
>     * Module ZODB.Connection, line 625, in _set_ghost_state
>
> AttributeError: 'long' object has no attribute 'keys'
>
> Any ideas where this might comes from? There is no corresponding code
> that might call keys()?

I don't know, but _set_ghost_state calls an update() method, and at least
the builtin Python dict.update(whatever) will raise an AttributeError if
whatever isn't a dict and whatever doesn't have a keys() method.  So it's
probably related.  I expect there should be more information in your log
file, because the body of ZODB.Connection.setstate is in a try/except block
that logs an ERROR message whenever anything goes wrong:

        except ConflictError:
            raise
        except:
            LOG('ZODB', ERROR,
                "Couldn't load state for %s" % oid_repr(oid),
                error=sys.exc_info())
            raise




More information about the ZODB-Dev mailing list