[Spambayes] spambayes question
bill parducci
bill at parducci.net
Thu Feb 27 20:48:41 EST 2003
Skip Montanaro wrote:
[...]
> 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.
$ spambayes/mboxtrain.py -d /var/spool/mail/bill -s /home/bill/mail/spam
Traceback (most recent call last):
File "spambayes/mboxtrain.py", line 38, in ?
from spambayes import hammie, mboxutils
File "./spambayes/hammie.py", line 5, in ?
spambayes.hammiebulk.main()
File "./spambayes/storage.py", line 62, in ?
File "spambayes/spambayes/dbmstorage.py", line 17
try:
^
IndentationError: unindent does not match any outer indentation level
syntax error?
(dbmstorage.py)
def open_dbhash(*args):
"""Open a bsddb hash. Don't use this on Windows."""
import bsddb
try:
return bsddb.hashopen(*args)
except bsddb.error:
print >> sys.stderr, args
raise
sorry, i am a python noob so unfamiliar with code structure.
b
More information about the Spambayes
mailing list