I get a mistake having a Shelve database in Python 2.7

I recieve the next error:

database = shelve.open("filename.db")

Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    database = shelve.open("filename.db")
  File "C:\Python25\lib\shelve.py", line 225, in open
    return DbfilenameShelf(filename, flag, protocol, writeback)
  File "C:\Python25\lib\shelve.py", line 209, in __init__
    Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
  File "C:\Python25\lib\anydbm.py", line 83, in open
    return mod.open(file, flag, mode)
  File "C:\Python25\lib\dbhash.py", line 16, in open
    return bsddb.hashopen(file, flag, mode)
  File "C:\Python25\lib\bsddb\__init__.py", line 306, in hashopen
    d.open(file, db.DB_HASH, flags, mode)
DBInvalidArgError: (22, 'Invalid argument -- filename.db: unsupported hash version: 9')

Any help could be appreciated, thanks.