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

SourceForge.net noreply at sourceforge.net
Tue Jul 29 02:03:36 EDT 2003


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

Category: None
Group: None
>Status: Closed
>Resolution: Fixed
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: Tony Meyer (anadelonbrin)
Date: 2003-07-29 20:03

Message:
Logged In: YES 
user_id=552329

If this happening to anyone, please reopen.

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

Comment By: Tony Meyer (anadelonbrin)
Date: 2003-07-28 14:27

Message:
Logged In: YES 
user_id=552329

If this is still happening to anyone, could you let us know?  
This may have been caused by training at a bad time in 
Outlook, and using dumbdbm in other apps.  There may still be 
a third cause, of course...

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

Comment By: Mark Hammond (mhammond)
Date: 2003-06-04 20:35

Message:
Logged In: YES 
user_id=14198

Outlook again: [ 730151 ] Outlook fails to classify

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

Comment By: Mark Hammond (mhammond)
Date: 2003-06-04 20:16

Message:
Logged In: YES 
user_id=14198

Another Outlook report in [ 745292 ] Logs Show COM error

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

Comment By: Mark Hammond (mhammond)
Date: 2003-06-04 20: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 12: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-bugs mailing list