[Spambayes] AssertionError: assert spamcount <= nspam ??

Gregory Gulik greg at gulik.org
Tue May 3 06:48:13 CEST 2005

I was checking out the state of spam filtering on my servers today and 
noticed in the logs a lot of the following errors:

Traceback (most recent call last):
   File "/usr/bin/sb_filter.py", line 257, in ?
   File "/usr/bin/sb_filter.py", line 248, in main
   File "/usr/bin/sb_filter.py", line 180, in filter
     return self.h.filter(msg)
   File "/usr/lib/python2.3/site-packages/spambayes/hammie.py", line 
109, in filter
     prob, clues = self._scoremsg(msg, True)
   File "/usr/lib/python2.3/site-packages/spambayes/hammie.py", line 38, 
in _scoremsg
     return self.bayes.spamprob(tokenize(msg), evidence)
   File "/usr/lib/python2.3/site-packages/spambayes/classifier.py", line 
190, in chi2_spamprob
     clues = self._getclues(wordstream)
   File "/usr/lib/python2.3/site-packages/spambayes/classifier.py", line 
493, in _getclues
     tup = self._worddistanceget(word)
   File "/usr/lib/python2.3/site-packages/spambayes/classifier.py", line 
508, in _worddistanceget
     prob = self.probability(record)
   File "/usr/lib/python2.3/site-packages/spambayes/classifier.py", line 
311, in probability
     assert spamcount <= nspam
procmail: Program failure (1) of "/usr/bin/sb_filter.py"
procmail: Rescue of unfiltered data succeeded

I even tried to upgrade to the latest 1.0.4 version and it's still 
happening.  I checked the archives and see reports of this problem going 
back a couple years!

If it matters it only seems to get triggered by very spammy messages.
I'm running sb_filter.py out of Procmail.  OS is RHEL4.

Greg Gulik                                 http://www.gulik.org/greg/
greg @ gulik.org

More information about the Spambayes mailing list