[Python-bugs-list] [Bug #110612] anydbm can't handle dumbdbm (PR#200)
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 17 Sep 2000 04:24:40 -0700
Bug #110612, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: Fixed
Bug Group: None
Priority: 5
Summary: anydbm can't handle dumbdbm (PR#200)
Details: Jitterbug-Id: 200
Submitted-By: aa8vb@yahoo.com
Date: Wed, 9 Feb 2000 13:05:57 -0500 (EST)
Version: 1.5.2
OS: IRIX 6.5
Basically, anydbm won't open dumbdbm files that anydbm created.
>>> import anydbm
>>> db = anydbm.open( "database", "c" )
>>> db[ "1" ] = "one"
>>> db.close()
>>> db = anydbm.open( "database", "r" )
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "/home/rhh/software/python-1.5.2/lib/python1.5/anydbm.py", line 80,
in
open
raise error, "need 'c' or 'n' flag to open new db"
anydbm.error: need 'c' or 'n' flag to open new db
More details can be found in the c.l.python thread "anydbm - a simple
question".
I searched for a matching bug and didn't find one in the database. Also,
I verified my whichdb.py matches what's currently in CVS, so I don't think
this has been fixed yet.
Thanks,
Randall
====================================================================
Audit trail:
Wed Feb 23 21:40:05 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 02:24
By: moshez
Comment:
It was a simple glitch in whichdb -- it didn't recognize the
dumbdbm format. Fixed it.
-------------------------------------------------------
Date: 2000-Sep-15 16:22
By: none
Comment:
I think this bug has appeared again. I get the exact same error with Python 1.6, but it works with 1.5.2.
-------------------------------------------------------
Date: 2000-Sep-15 17:15
By: gvanrossum
Comment:
Reopened and assigned to Jeremy since a comment claims it's reappeared in 1.6. Can you check 2.0?
-------------------------------------------------------
Date: 2000-Sep-17 04:24
By: loewis
Comment:
The following script works for me, in 2.0b1
>>> import dumbdbm
>>> dumbdbm.open("/tmp/hhh","c")
<dumbdbm._Database instance at 0x829eaac>
>>> s=_
>>> s['a']='b'
>>> s.close()
>>> import whichdb
>>> whichdb.whichdb("/tmp/hhh")
'dumbdbm'
>>> import anydbm
>>> s=anydbm.open("/tmp/hhh")
>>> s
So it works for me, on i586-pc-linux-gnu.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110612&group_id=5470