[Spambayes] Database Format

Brent L Johnson brent at bjohnson.net
Tue Feb 10 10:22:05 EST 2004


> In the source distribution (you'll need Python installed as 
> well) there is a script called sb_dbexpimp.py.  It'll convert 
> the database to a flat-text '`'-separated file, which you can use.

I installed SB on my Linux box from the source distribution
(1.0a9).  I then copied my database from my WinXP machine (I'm
using the Outlook plugin) and ran:

sb_dbexpimp.py -e -p default_bayes_database.db  -f bayes.out

Not sure if these are the correct parameters, but I based
it off the usage help for sb_dbexpimp.  But when I run that
I get the following:

Traceback (most recent call last):
  File "/usr/bin/sb_dbexpimp.py", line 266, in ?
    runExport(dbFN, useDBM, flatFN)
  File "/usr/bin/sb_dbexpimp.py", line 119, in runExport
    bayes = spambayes.storage.open_storage(dbFN, useDBM)
  File "/usr/lib/python2.2/site-packages/spambayes/storage.py", line
669, in open_storage
    return klass(data_source_name)
  File "/usr/lib/python2.2/site-packages/spambayes/storage.py", line 90,
in __init__
    self.load()
  File "/usr/lib/python2.2/site-packages/spambayes/storage.py", line
113, in load
    tempbayes = pickle.load(fp)
cPickle.UnpicklingError: invalid load key, ''.

Is the db version for the Outlook plugin a picked db or DBM?

Thanks,

- Brent




More information about the Spambayes mailing list