[Spambayes] problem on NetBSD

Kenny Pitt kenny.pitt at gmail.com
Fri Jan 7 19:03:10 CET 2005

Michael Davidson wrote:
> I have noticed that in dbmstorage.py there is this code:
> if sys.platform == "win32" and sys.version_info < (2,3) and \
>            dbm_type == "dbhash":
>     dbm_type = "db3hash"
> This is basically what I have to do to get spambayes working on my
> system. 

whichdb returns "dbhash" because the "bsddb" module in Python 2.3+ is really
the same as "bsddb3" with a different name.  I don't have access to NetBSD
myself, so try the following fix and see if it works for you.  If it does,
let me know and I'll put it into the code for the next release.

In the open_dbhash function in dbmstorage.py, you should see the following

    import bsddb

Change that line to the following:

        import bsddb
    except ImportError:
        import bsddb3 as bsddb

Kenny Pitt

More information about the Spambayes mailing list