[spambayes-dev] [ spambayes-Bugs-706520 ] assert fails in classifier

SourceForge.net noreply at sourceforge.net
Wed Jun 4 02:07:55 EDT 2003


Bugs item #706520, was opened at 2003-03-20 07:46
Message generated for change (Comment added) made by mhammond
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=706520&group_id=61702

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Adam Glass (adamglass)
Assigned to: Nobody/Anonymous (nobody)
Summary: assert fails in classifier

Initial Comment:
This morning, I noticed that my emails no longer had a
X-Spambayes-Classification header, so I looked through
my procmail logs, and sure enough, hammiefilter.py is
giving a traceback when an assertion fails.  This
happens on all messages now; it is not specific to a
single message, or intermittent.  Therefore, I suspect
my .hammiedb is corrupted... I can supply it to anyone
who would like to investigate it for debugging purposes.

I am using Spambayes 1.0a2, installed on a system with
Python 2.2.1, with the new version of the email library
(as per the install docs.)

Please contact me if you require any further details.

Example of how to generate the error follows, along
with traceback:

adam$ /usr/local/bin/hammiefilter.py -f -d
$HOME/.hammiedb < example
Traceback (most recent call last):
  File "/usr/local/bin/hammiefilter.py", line 179, in ?
    main()
  File "/usr/local/bin/hammiefilter.py", line 175, in main
    action(msg)
  File "/usr/local/bin/hammiefilter.py", line 113, in
filter
    return h.filter(msg)
  File
"/usr/local/lib/python2.2/site-packages/spambayes/hammie.py",
line 108, in filter
    prob, clues = self._scoremsg(msg, True)
  File
"/usr/local/lib/python2.2/site-packages/spambayes/hammie.py",
line 38, in _scoremsg
    return self.bayes.spamprob(tokenize(msg), evidence)
  File
"/usr/local/lib/python2.2/site-packages/spambayes/classifier.py",
line 217, in chi2_spamprob
    clues = self._getclues(wordstream)
  File
"/usr/local/lib/python2.2/site-packages/spambayes/classifier.py",
line 441, in _getclues
    prob = self.probability(record)
  File
"/usr/local/lib/python2.2/site-packages/spambayes/classifier.py",
line 304, in probability
    assert spamcount <= nspam
AssertionError


----------------------------------------------------------------------

>Comment By: Mark Hammond (mhammond)
Date: 2003-06-04 18:07

Message:
Logged In: YES 
user_id=14198

Noting we have an Outlook user with this now too:
[ 747458 ] messages not processed
(which I closed as a dupe)

----------------------------------------------------------------------

Comment By: Leonid (leobru)
Date: 2003-05-31 10:36

Message:
Logged In: YES 
user_id=790676

This happens, e.g., if a forced re-training was performed on
a non-empty database, thus screwing up the message counts -
this is for sure, I was bitten by it myself;

or, potentially, if hammiefilter.py -t and mboxtrain.py were
running at the same time ???

To avoid: do not do it (I do not use hammiefilter.py -t to
be on the safe side).

To fix, once it happens: start from scratch.

Good to have in the next version: a database validator and
corrector. 



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=706520&group_id=61702



More information about the spambayes-dev mailing list