[spambayes-dev] assertion error in sb_filter.py

paul sorenson paul at metrak.com
Wed Mar 22 09:50:09 CET 2006

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.

For training I have just been running sb_filter.py -g/-s from the 
command line on appropriate mailboxes.  I notice when I run sb_filter.py 
the file modified date on ~/.hammiedb changes but the size doesn't.

I have presumably missed something.  In ~/hammierc I have:

persistent_use_database = True
persistent_storage_file = ~./hammiedb

Procmail log:

procmail: [15664] Wed Mar 22 18:47:51 2006
procmail: Assigning "MAILDIR=/home/pms/mail"
procmail: Assigning "INCLUDERC=/home/pms/.procmail/rc.spambayes"
procmail: Locking "hamlock"
procmail: Executing "/usr/bin/sb_filter.py"
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.4/site-packages/spambayes/hammie.py", line 109, 
in filter
    prob, clues = self._scoremsg(msg, True)
  File "/usr/lib/python2.4/site-packages/spambayes/hammie.py", line 38, 
in _scoremsg
    return self.bayes.spamprob(tokenize(msg), evidence)
  File "/usr/lib/python2.4/site-packages/spambayes/classifier.py", line 
190, in chi2_spamprob
    clues = self._getclues(wordstream)
  File "/usr/lib/python2.4/site-packages/spambayes/classifier.py", line 
493, in _getclues
    tup = self._worddistanceget(word)
  File "/usr/lib/python2.4/site-packages/spambayes/classifier.py", line 
508, in _worddistanceget
    prob = self.probability(record)
  File "/usr/lib/python2.4/site-packages/spambayes/classifier.py", line 
308, in probability
    assert hamcount <= nham
procmail: Program failure (1) of "/usr/bin/sb_filter.py"
procmail: Rescue of unfiltered data succeeded
procmail: Unlocking "hamlock"

More information about the spambayes-dev mailing list