Issue 1394135: Deleting first item causes anydbm.first() to fail (original) (raw)

Created on 2005-12-31 04:24 by danbiz, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
dbmBug.py danbiz,2005-12-31 04:24 Code snippet and sample output
Messages (6)
msg27188 - (view) Author: Dan Bisalputra (danbiz) Date: 2005-12-31 04:24
If the first item in a database is deleted, the first call to anydbm.first() after the deletion causes a DBNotFoundError exception to be raised. The attached program causes the error on my system. I am currently working around the problem by calling first() after each deletion, enclosed by a try block. I am using Python 2.4.2 running under Windows ME.
msg27189 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-01-10 22:50
Logged In: YES user_id=1188172 Confirmed here (Linux, various Pythons).
msg27190 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2006-01-11 12:19
Logged In: YES user_id=29957 Which backend is this using? anydbm is just a very very simple wrapper around a bunch of different backends - I have difficulty believing that they _all_ have the same problem. :)
msg27191 - (view) Author: Dan Bisalputra (danbiz) Date: 2006-01-11 17:51
Logged In: YES user_id=534494 whichdb() tells me it is using dbhash. By the way, my workaround using the try/except block ended up deferring the problem until later. I eventually ended up closing and reopening the database after each deletion. Not a problem for the simple application I was building; the database worked great otherwise.
msg83894 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-03-20 23:53
Cannot reproduce with dbhash on trunk (Linux).
msg115000 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-08-26 16:19
No replky to .
History
Date User Action Args
2022-04-11 14:56:14 admin set github: 42742
2010-08-26 16:19:13 BreamoreBoy set status: open -> closednosy: + BreamoreBoymessages: + resolution: out of date
2009-04-22 14:35:50 ajaksu2 set keywords: + easy
2009-03-20 23:53:03 ajaksu2 set versions: + Python 2.6, - Python 2.4nosy: + ajaksu2messages: + type: behaviorstage: test needed
2005-12-31 04:24:52 danbiz create