[Spambayes] Classifier Assertion error

Meyer, Tony T.A.Meyer at massey.ac.nz
Sun Apr 27 15:03:30 EDT 2003


> This is happening with a new DB (and new 
> spambayes.messageinfo.db) trained with imapfilter:
> 
> Loading database hammie.db... Loading state from hammie.db 
> database hammie.db is an existing database, with 96 spam and 
> 63 ham Done. Classifying Traceback (most recent call last):
[...]
>   File "C:\Development\SpamBayes\spambayes\spambayes\classifier.py",
> line 301, in probability
>     assert hamcount <= nham
> AssertionError

This is the same as SF #706520 ("assert fails in classifier").  If I
understand things correctly, this probably means that the ham and spam
counts in your database has become corrupted.  This bug is one that we
know really needs to get fixed, and people are thinking about at least,
but hasn't yet been solved.

I gather than what you can do is:
  (a)  Retrain, if you have the data available
  (b)  Use dbimpexp.py to convert your database to a text file.  Change
the ham and spam counts at the top to something like the numbers they
should be (at the very least, they need to be greater or equal to the
highest number in their column).  Use dbimpexp.py to convert the text
file back into a database.

=Tony Meyer



More information about the Spambayes mailing list