[ZODB-Dev] Can iterate thru records - but cannot access same record directly by key

Jim Fulton jim at zope.com
Wed Dec 28 17:22:05 UTC 2011


On Tue, Dec 27, 2011 at 9:36 PM, tsmiller <tsmiller at gnixterhouse.com> wrote:
>
> I have a problem that occurs sporadically, and I do not have a clue why it
> happens.  When I restart my cherrypy python server using ZODB3 I cannot
> access records that were previously written to the database.  The ZODB3
> database works fine for a long time (weeks) and then it seems that something
> internal happens to the ZODB3 and the saved changes start screwing up. The
> data exists because I can iterate through it and print out the records, but
> if I try to access the record directly via the key - then I get a KeyError.
>
> Please see the code below and its output.  My keys are all character and in
> this case, all of my records with an item id greater than 6198 exist in the
> database, but I cannot access them.  Can someone put me on a path to
> enlightenment!
>
> thanks,
>
> tom
>
>        base = db.dataConn["1292289873"]["books"]["1292289873"]

What is db?

What version of ZODB are you using?

What Storage?

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton


More information about the ZODB-Dev mailing list