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



        base = db.dataConn["1292289873"]["books"]["1292289873"]
        print "Length of Data Conn", len(base)
        print "Account Key", db.dataConn["1292289873"]
        print "Store Type", db.dataConn["1292289873"]["books"]
        print "Store Key", db.dataConn["1292289873"]["books"]["1292289873"]
        for k, v in base.items():
                if int(k) > 6195:
                                print k, type(k), base[k]
                        except KeyError:
                                print "KEY ERROR", k, type(k)

Length of Data Conn 1808
Account Key <BTrees.OOBTree.OOBTree object at 0x9f1380c>
Store Type <BTrees.OOBTree.OOBTree object at 0x9f138e4>
Store Key <BTrees.OOBTree.OOBTree object at 0x9f13bb4>

6196 <type 'unicode'> {u'82': u'11/30/11', u'83': u'$0.43', u'80': u'Thrift
Store', u'81': u'Ludowici', u'24': u'$3.00', u'25': u'Cooking', u'23':
u'madeleinecooks.jpg', u'22':
u'<p>Description</p><p></p><p></p><p></p><div>Light shelfwear. Includes a 16
page recipe booklet from the new series.</div>', u'49': u'1986', u'46':
u'Very Good', u'47': u'0688062032', u'44': u'Hardback', u'45': u'Very
Good+', u'42': u'Kamman, Madeleine', u'43': u'William Morrow and Company,
Inc.', u'41': u"Madeleine Cook's: A Wonderful Teacher Reveals the Secrets of
Cooking Great Good Every Day", u'1': '1292289873', u'0': u'6196', u'3':
'1292289873', u'2': 'books', '5': u'no-change', u'4': 'replace', u'6':
'5eca838a715efd60f77fafd5b9058481c88043d9', u'76': u'New York', u'101':
u'Shelved', u'11': u'12/02/11', u'13': '12/15/11', u'12': u'1322879948',
u'14': '1323973197', u'55': u'The Companion Book to the Nationally Acclaimed
Public Television Series', u'54': u'Sm 4to (9 1/2" tall)', u'57': u'207',
u'56': u'First Printing ', u'51': u'First Edition'}

6198 <type 'unicode'> {u'56': u'First Printing', u'82': u'11/30/11', u'83':
u'$0.43', u'80': u'Thrift Store', u'81': u'Ludowici', u'24': u'$8.00',
u'25': u'Fishing', u'27': u'For next upload', u'22':
u'<p></p><p>Description</p><p></p><p></p><p></p><div>6 small ink numbers
written on the top of the first page. Nice color illustrations of the
baitfish.</div><p></p>', u'49': u'1995', u'47': u'1571880178', u'44':
u'Softcover', u'45': u'Very Good', u'42': u'Caolo, Alan', u'43': u'Frank
Amato', u'41': u"Fly Fisherman's Guide to Atlantic Baitfish & Other Food
Sources", u'1': '1292289873', u'0': u'6198', u'3': '1292289873', u'2':
'books', u'5': u'no-change', u'4': 'replace', u'6':
'5eca838a715efd60f77fafd5b9058481c88043d9', u'76': u'Portland', u'101':
u'Shelved', u'11': u'12/02/11', u'13': '12/15/11', u'12': u'1322880402',
u'14': '1323973515', u'54': u'8vo (8 1/2" tall)', u'57': u'48', u'23':

6201 <type 'unicode'> KEY ERROR 6201 <type 'unicode'>
6202 <type 'unicode'> KEY ERROR 6202 <type 'unicode'>
6204 <type 'unicode'> KEY ERROR 6204 <type 'unicode'>
6206 <type 'unicode'> KEY ERROR 6206 <type 'unicode'>
6207 <type 'unicode'> KEY ERROR 6207 <type 'unicode'>
6208 <type 'unicode'> KEY ERROR 6208 <type 'unicode'>
6209 <type 'unicode'> KEY ERROR 6209 <type 'unicode'>
6210 <type 'unicode'> KEY ERROR 6210 <type 'unicode'>
6211 <type 'unicode'> KEY ERROR 6211 <type 'unicode'>
6225 <type 'unicode'> KEY ERROR 6225 <type 'unicode'>
6226 <type 'unicode'> KEY ERROR 6226 <type 'unicode'>
6227 <type 'unicode'> KEY ERROR 6227 <type 'unicode'>
6228 <type 'unicode'> KEY ERROR 6228 <type 'unicode'>
6229 <type 'unicode'> KEY ERROR 6229 <type 'unicode'>
6230 <type 'unicode'> KEY ERROR 6230 <type 'unicode'>
6231 <type 'unicode'> KEY ERROR 6231 <type 'unicode'>
6232 <type 'unicode'> KEY ERROR 6232 <type 'unicode'>
6233 <type 'unicode'> KEY ERROR 6233 <type 'unicode'>
6234 <type 'unicode'> KEY ERROR 6234 <type 'unicode'>
6235 <type 'unicode'> KEY ERROR 6235 <type 'unicode'>
6236 <type 'unicode'> KEY ERROR 6236 <type 'unicode'>
6237 <type 'unicode'> KEY ERROR 6237 <type 'unicode'>
6238 <type 'unicode'> KEY ERROR 6238 <type 'unicode'>
6239 <type 'unicode'> KEY ERROR 6239 <type 'unicode'>
6240 <type 'unicode'> KEY ERROR 6240 <type 'unicode'>
6241 <type 'unicode'> KEY ERROR 6241 <type 'unicode'>
6242 <type 'unicode'> KEY ERROR 6242 <type 'unicode'>
6243 <type 'unicode'> KEY ERROR 6243 <type 'unicode'>
6244 <type 'unicode'> KEY ERROR 6244 <type 'unicode'>
6245 <type 'unicode'> KEY ERROR 6245 <type 'unicode'>
6246 <type 'unicode'> KEY ERROR 6246 <type 'unicode'>
6247 <type 'unicode'> KEY ERROR 6247 <type 'unicode'>
6248 <type 'unicode'> KEY ERROR 6248 <type 'unicode'>
6249 <type 'unicode'> KEY ERROR 6249 <type 'unicode'>
6250 <type 'unicode'> KEY ERROR 6250 <type 'unicode'>
6251 <type 'unicode'> KEY ERROR 6251 <type 'unicode'>
6252 <type 'unicode'> KEY ERROR 6252 <type 'unicode'>
6253 <type 'unicode'> KEY ERROR 6253 <type 'unicode'>
6254 <type 'unicode'> KEY ERROR 6254 <type 'unicode'>
6255 <type 'unicode'> KEY ERROR 6255 <type 'unicode'>
6256 <type 'unicode'> KEY ERROR 6256 <type 'unicode'>
6257 <type 'unicode'> KEY ERROR 6257 <type 'unicode'>
6258 <type 'unicode'> KEY ERROR 6258 <type 'unicode'>
6259 <type 'unicode'> KEY ERROR 6259 <type 'unicode'>
6260 <type 'unicode'> KEY ERROR 6260 <type 'unicode'>
6261 <type 'unicode'> KEY ERROR 6261 <type 'unicode'>
6262 <type 'unicode'> KEY ERROR 6262 <type 'unicode'>
6263 <type 'unicode'> KEY ERROR 6263 <type 'unicode'>
6264 <type 'unicode'> KEY ERROR 6264 <type 'unicode'>
6265 <type 'unicode'> KEY ERROR 6265 <type 'unicode'>
6266 <type 'unicode'> KEY ERROR 6266 <type 'unicode'>
6267 <type 'unicode'> KEY ERROR 6267 <type 'unicode'>
6268 <type 'unicode'> KEY ERROR 6268 <type 'unicode'>
6269 <type 'unicode'> KEY ERROR 6269 <type 'unicode'>
6270 <type 'unicode'> KEY ERROR 6270 <type 'unicode'>
6271 <type 'unicode'> KEY ERROR 6271 <type 'unicode'>
6272 <type 'unicode'> KEY ERROR 6272 <type 'unicode'>
6273 <type 'unicode'> KEY ERROR 6273 <type 'unicode'>
6274 <type 'unicode'> KEY ERROR 6274 <type 'unicode'>
6275 <type 'unicode'> KEY ERROR 6275 <type 'unicode'>
6276 <type 'unicode'> KEY ERROR 6276 <type 'unicode'>
6277 <type 'unicode'> KEY ERROR 6277 <type 'unicode'>
6278 <type 'unicode'> KEY ERROR 6278 <type 'unicode'>
6279 <type 'unicode'> KEY ERROR 6279 <type 'unicode'>
6280 <type 'unicode'> KEY ERROR 6280 <type 'unicode'>
6281 <type 'unicode'> KEY ERROR 6281 <type 'unicode'>
6282 <type 'unicode'> KEY ERROR 6282 <type 'unicode'>
6283 <type 'unicode'> KEY ERROR 6283 <type 'unicode'>
6284 <type 'unicode'> KEY ERROR 6284 <type 'unicode'>
6285 <type 'unicode'> KEY ERROR 6285 <type 'unicode'>
6286 <type 'unicode'> KEY ERROR 6286 <type 'unicode'>
6287 <type 'unicode'> KEY ERROR 6287 <type 'unicode'>
6288 <type 'unicode'> KEY ERROR 6288 <type 'unicode'>
6289 <type 'unicode'> KEY ERROR 6289 <type 'unicode'>
6290 <type 'unicode'> KEY ERROR 6290 <type 'unicode'>
6291 <type 'unicode'> KEY ERROR 6291 <type 'unicode'>
6292 <type 'unicode'> KEY ERROR 6292 <type 'unicode'>
6293 <type 'unicode'> KEY ERROR 6293 <type 'unicode'>
6294 <type 'unicode'> KEY ERROR 6294 <type 'unicode'>
6295 <type 'unicode'> KEY ERROR 6295 <type 'unicode'>
6296 <type 'unicode'> KEY ERROR 6296 <type 'unicode'>
6297 <type 'unicode'> KEY ERROR 6297 <type 'unicode'>
6298 <type 'unicode'> KEY ERROR 6298 <type 'unicode'>
6299 <type 'unicode'> KEY ERROR 6299 <type 'unicode'>
6300 <type 'unicode'> KEY ERROR 6300 <type 'unicode'>
6301 <type 'unicode'> KEY ERROR 6301 <type 'unicode'>
6302 <type 'unicode'> KEY ERROR 6302 <type 'unicode'>
6303 <type 'unicode'> KEY ERROR 6303 <type 'unicode'>
6304 <type 'unicode'> KEY ERROR 6304 <type 'unicode'>
6305 <type 'unicode'> KEY ERROR 6305 <type 'unicode'>
6306 <type 'unicode'> KEY ERROR 6306 <type 'unicode'>
6307 <type 'unicode'> KEY ERROR 6307 <type 'unicode'>
6308 <type 'unicode'> KEY ERROR 6308 <type 'unicode'>
6309 <type 'unicode'> KEY ERROR 6309 <type 'unicode'>
6310 <type 'unicode'> KEY ERROR 6310 <type 'unicode'>
6311 <type 'unicode'> KEY ERROR 6311 <type 'unicode'>
6312 <type 'unicode'> KEY ERROR 6312 <type 'unicode'>
6313 <type 'unicode'> KEY ERROR 6313 <type 'unicode'>
6314 <type 'unicode'> KEY ERROR 6314 <type 'unicode'>
6315 <type 'unicode'> KEY ERROR 6315 <type 'unicode'>
6316 <type 'unicode'> KEY ERROR 6316 <type 'unicode'>
6317 <type 'unicode'> KEY ERROR 6317 <type 'unicode'>
6318 <type 'unicode'> KEY ERROR 6318 <type 'unicode'>
6319 <type 'unicode'> KEY ERROR 6319 <type 'unicode'>
6320 <type 'unicode'> KEY ERROR 6320 <type 'unicode'>
6321 <type 'unicode'> KEY ERROR 6321 <type 'unicode'>
6322 <type 'unicode'> KEY ERROR 6322 <type 'unicode'>
6323 <type 'unicode'> KEY ERROR 6323 <type 'unicode'>
6324 <type 'unicode'> KEY ERROR 6324 <type 'unicode'>

View this message in context: 
Sent from the Zope - ZODB-Dev mailing list archive at Nabble.com.

For more information about ZODB, see http://zodb.org/

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

Reply via email to