[Spambayes] [spambayes-dev] assertion error in sb_filter.py
Tony Meyer
tameyer at ihug.co.nz
Mon Mar 27 05:52:19 CEST 2006
[Moved to spambayes at python.org from spambayes-dev]
> I have been using spambayes for ages with the pop proxy and have just
> migrated my server to IMAP. I am currently running sb_filter from a
> procmail script and getting the traceback in the procmail log below.
> [...]
> File "/usr/lib/python2.4/site-packages/spambayes/classifier.py",
> line
> 308, in probability
> assert hamcount <= nham
> AssertionError
This is saying that you have a token that has been seen in more ham
than the total number of ham you have trained (which is impossible,
so is really saying that there is a problem with the database).
You can export the database to CSV (with sb_dbexpimp.py), manually
correct the counts, and then convert back, but you're probably better
off just replacing the database with a fresh one.
(This shouldn't happen again - if it does, the most likely
explanation is that two processes have the database open for writing
at the same time, so that would be the first thing to check).
=Tony.Meyer
--
Please always include the list (spambayes at python.org) in your replies
(reply-all), and please don't send me personal mail about SpamBayes.
http://www.massey.ac.nz/~tameyer/writing/reply_all.html explains this.
More information about the SpamBayes
mailing list