[spambayes-bugs] [ spambayes-Bugs-852137 ] sb_imapfilter.py AssertionError: hamcount <= nham

SourceForge.net noreply at sourceforge.net
Mon Dec 1 10:39:57 EST 2003


Bugs item #852137, was opened at 2003-12-01 15:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=852137&group_id=61702

Category: imapfilter
Group: Source code - CVS
Status: Open
Resolution: None
Priority: 5
Submitted By: Tony Lownds (tonylownds)
Assigned to: Tony Meyer (anadelonbrin)
Summary: sb_imapfilter.py AssertionError: hamcount <= nham

Initial Comment:
When I classify through sb_imapfilter.py, I am getting an 
AssertionError. Any ideas? I am using spambayes from CVS; 
courier IMAP; python 2.2.2; and a just-deleted database. See 
below for commands, and further below for database dumps.

[tony ~]$ rm hammie.db spambayes.messageinfo.db
[tony ~]$ /usr/bin/sb_imapfilter.py -t
SpamBayes IMAP Filter Beta1, version 0.1 (September 
2003),
using SpamBayes IMAP Filter Web Interface Alpha2, version 
0.02
and engine SpamBayes Beta2, version 0.2 (July 2003).

Loading state from hammie.db database
hammie.db is a new database
Loading database hammie.db... Done.
Training
   Training ham folder INBOX.Ham
**************       14 trained.
   Training spam folder INBOX.Spam
********************************************       44 
trained.
Persisting hammie.db state in database
Training took 2.87554502487 seconds, 58 messages were 
trained
[tony ~]$ /usr/bin/sb_imapfilter.py -c
SpamBayes IMAP Filter Beta1, version 0.1 (September 
2003),
using SpamBayes IMAP Filter Web Interface Alpha2, version 
0.02
and engine SpamBayes Beta2, version 0.2 (July 2003).

Loading state from hammie.db database
hammie.db is an existing database, with 44 spam and 10 
ham
Loading database hammie.db... Done.
Classifying *.Traceback (most recent call last):
  File "/usr/bin/sb_imapfilter.py", line 821, in ?
    run()
  File "/usr/bin/sb_imapfilter.py", line 811, in run
    imap_filter.Filter()
  File "/usr/bin/sb_imapfilter.py", line 676, in Filter
    self.unsure_folder)
  File "/usr/bin/sb_imapfilter.py", line 595, in Filter
    evidence=True)
  File "/usr/lib/python2.2/site-packages/spambayes/
classifier.py", line 158, in chi2_spamprob
    clues = self._getclues(wordstream)
  File "/usr/lib/python2.2/site-packages/spambayes/
classifier.py", line 395, in _getclues
    prob = self.probability(record)
  File "/usr/lib/python2.2/site-packages/spambayes/
classifier.py", line 242, in probability
    assert hamcount <= nham
AssertionError



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

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



More information about the Spambayes-bugs mailing list