[Spambayes] So close but yet...
skip at pobox.com
Fri Dec 12 15:26:32 EST 2003
kent> Okay, that got me over the hump and everything is well and good,
kent> but SpamCount.py still has issues.
kent> I run:
kent> G:\sba>spamcounts.py -r '.*' -p -d 'G:\Documents and
kent> Settings\ktegels\Application Data\SpamBayes\default_bayes_database.db'
kent> I picked the default_bayes_database.db because I don't have
kent> And get:
kent> File "G:\Python23\lib\anydbm.py", line 77, in open
kent> raise error, "need 'c' or 'n' flag to open new db"
kent> anydbm.error: need 'c' or 'n' flag to open new db
My wild-ass guess is that you are actually using a pickle file, not a shelf
file for storage. Short term, try adding the -p flag to tell spamcounts.py
that your training datbase is a pickle. I just checked in a change so the
script uses the persistent_use_database to determine the default database
More information about the Spambayes