[Spambayes] Database Format

Brent L Johnson brent at bjohnson.net
Fri Feb 20 19:32:12 EST 2004


OK I'm still struggling with exporting the database.
This is driving me nuts.  I installed Python2.3 in hopes
that this would fix the problem.  It installed the binary
in /usr/bin/python2.3 and I changed the sb_dbexpimp.py
script to use the 2.3 executable.  Im now getting the following
error:

# sb_dbexpimp.py -e -d default_bayes_database.db -f bayes.export
Traceback (most recent call last):
  File "/usr/bin/sb_dbexpimp.py", line 104, in ?
    import spambayes.storage
ImportError: No module named spambayes.storage

Anyone have any other ideas as to how I can export my spambayes DB?

Thanks,

- Brent

> Brent L Johnson wrote:
> > OK I tried it with the -d option and I got the following error:
> > 
> > $ sb_dbexpimp.py -e -d default_bayes_database.db -f bayes.export 
> > 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 
> > 164, in __init__
> >     self.load()
> >   File 
> "/usr/lib/python2.2/site-packages/spambayes/storage.py", line 
> > 189, in load
> >     self.dbm = dbmstorage.open(self.db_name, self.mode)
> >   File "/usr/lib/python2.2/site-packages/spambayes/dbmstorage.py",
> > line 65, in open
> >     return f(db_name, mode)
> >   File "/usr/lib/python2.2/site-packages/spambayes/dbmstorage.py",
> > line 20, in open_dbhash
> >     return bsddb.hashopen(*args)
> > bsddb.error: (22, 'Invalid argument')
> 
> I see that you're using Python 2.2.  Have you installed the 
> pybsddb (aka
> bsddb3) package?  IIRC, this package is required if you are 
> using BerkeleyDB with Python 2.2.
> 
http://pybsddb.sourceforge.net/

-- 
Kenny Pitt







More information about the Spambayes mailing list