[Spambayes] spambayes question
Skip Montanaro
skip at pobox.com
Thu Feb 27 21:14:21 EST 2003
bill> $ rm .hammiedb
bill> $ spambayes/mboxtrain.py -d /var/spool/mail/bill -s /home/bill/mail/spam
bill> Traceback (most recent call last):
bill> File "spambayes/mboxtrain.py", line 278, in ?
bill> main()
bill> File "spambayes/mboxtrain.py", line 261, in main
bill> h = hammie.open(pck, usedb, "c")
bill> File "./spambayes/hammie.py", line 260, in open
bill> spambayes.hammiebulk.main()
bill> File "./spambayes/storage.py", line 140, in __init__
bill> File "./spambayes/storage.py", line 148, in load
bill> File "./spambayes/dbmstorage.py", line 54, in open
bill> File "./spambayes/dbmstorage.py", line 36, in open_best
bill> File "./spambayes/dbmstorage.py", line 17, in open_dbhash
bill> bsddb.error: (22, 'Invalid argument')
Something tells me it wasn't trying to open .hammiedb. You generally get an
'invalid argument' error when the file being opened already exists and was
created with something other than the relevant bsddb call.
In dbmstorage.py, try changing line 17 from
return bsddb.hashopen(*args)
to
try:
return bsddb.hashopen(*args)
except bsddb.error:
print >> sys.stderr, args
raise
It will still barf, but tell you exactly what file is being opened. See if
it already exists. If so, delete it and try again. If not, let us know.
Skip
More information about the Spambayes
mailing list