[Spambayes] hammiefilter just started failing

Gary Benson gary at inauspicious.org
Tue Feb 11 12:03:05 EST 2003


I've been using Spambayes for about a fortnight with great success,
but last night it started to fail.  Messages are being delivered (exim
has a safety net against pipes failing) but they are also being
bounced with the following traceback:

| Traceback (most recent call last):
|   File "/usr/bin/hammiefilter", line 134, in ?
|     main()
|   File "/usr/bin/hammiefilter", line 131, in main
|     action()
|   File "/usr/bin/hammiefilter", line 87, in filter
|     print h.filter(msg)
|   File "/usr/lib/python2.2/site-packages/spambayes/hammie.py", line 98, in filter
|     prob, clues = self._scoremsg(msg, True)
|   File "/usr/lib/python2.2/site-packages/spambayes/hammie.py", line 38, in _scoremsg
|     return self.bayes.spamprob(tokenize(msg), evidence)
|   File "/usr/lib/python2.2/site-packages/spambayes/classifier.py", line 217, in chi2_spamprob
|     clues = self._getclues(wordstream)
|   File "/usr/lib/python2.2/site-packages/spambayes/classifier.py", line 441, in _getclues
|     prob = self.probability(record)
|   File "/usr/lib/python2.2/site-packages/spambayes/classifier.py", line 304, in probability
|     assert spamcount <= nspam
| AssertionError

This is happening with all messages: a quick check shows that
spamcount is slightly higher than nspam (like 104 and 103) so I just
replaced the assertion with 'if spamcount > nspam: spamcount = nspam'
as a temporary workaround.

Has anyone heard of this happening before?  I'd like to know if this
is a known problem before I start trying to debug it...

I have a copy of my .hammiedb (taken before I did the above tweak) if
you want it.

Cheers,
Gary

[ gary at inauspicious.org ][ GnuPG 85A8F78B ][ http://inauspicious.org/ ]



More information about the Spambayes mailing list