Shelve Help!

Paul Boddie paulb at infercor.no
Mon Aug 21 08:06:49 EDT 2000


Catriona Johnston wrote:
> 
> Dear All,
>         I am afraid I have a problem that I cannot solve and was wondering
> if anyone could help. I am working on Red Hat Linux 6.1. I have been trying
> to use the shelve module, but am getting an error stating that no dbm can be
> found.

I had exactly the same problem last week. Red Hat Linux 6.1, Python 1.5.2 and...

[...]

>                 File "/usr/local/lib/python1.6/anydbm.py", line 83, in open
>                     raise error, "db type could not be determined"
>                 anydbm.error: db type could not be determined

The solution is much simpler than you suspect, however. Upon visiting
http://www.python.org and looking at the "Python Bugs List", searching for
"anydbm" and browsing the results, I found this:

http://www.python.org/python-bugs/resolved?id=97;expression=anydbm;user=guest

Guido himself provides a patch which I applied successfully to the whichdb.py
file in the Python libraries. Yes, it's a case of wishful thinking being
rewarded! (There's a pretty obvious problem with basic functionality, which
someone must have fixed, and indeed someone already has.)

Regards,

Paul



More information about the Python-list mailing list