[spambayes-bugs] [ spambayes-Bugs-1149648 ] please provide some locking mechanism

SourceForge.net noreply at sourceforge.net
Thu Feb 24 12:56:06 CET 2005


Bugs item #1149648, was opened at 2005-02-23 09:55
Message generated for change (Comment added) made by fenio
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=1149648&group_id=61702

Category: hammie
Group: Source code - CVS
>Status: Open
Resolution: Invalid
>Priority: 2
Submitted By: Bartosz Feński (fenio)
Assigned to: Nobody/Anonymous (nobody)
>Summary: please provide some locking mechanism

Initial Comment:
Hello.

sb_filter crashes when it receives some lines.

Here's my output:

(fenio at domek)~/Mail/debian-security/cur$echo "Normal
line which should work" | sb_filter.py 
X-Spambayes-Classification: unsure; 0.52

Normal line which should work
(fenio at domek)~/Mail/debian-security/cur$head -1
1109110296.7674_3.on:2,S
Return-Path:
<bounce-debian-security=fenio=o2.pl at lists.debian.org>
(fenio at domek)~/Mail/debian-security/cur$head -1
1109110296.7674_3.on:2,S | sb_filter.py 
Traceback (most recent call last):
  File "/usr/bin/sb_filter.py", line 257, in ?
    main()
  File "/usr/bin/sb_filter.py", line 248, in main
    action(msg)
  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
AssertionError
(fenio at domek)~/Mail/debian-security/cur$

Any hints what should I make with this?

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

>Comment By: Bartosz Fe&#324;ski (fenio)
Date: 2005-02-24 12:56

Message:
Logged In: YES 
user_id=770596

Thanks. Rebuilding database from scratch did the trick.

But in that case my database will get corrupted almost every
week.

So here's my wishlist. Is it possible to provide some
locking mechanism? I know I can use procmail's locking, but
if procmail is delivering my mails and in the same time I'm
reading some mails and try to mark them as spam my database
will get corrupted again.

regards
fEnIo

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

Comment By: Tony Meyer (anadelonbrin)
Date: 2005-02-24 00:38

Message:
Logged In: YES 
user_id=552329

It means that your database is corrupt (there is a token
that has been seen in more spam than you have trained on,
which is not possible).  The solution is to retrain.

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

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


More information about the Spambayes-bugs mailing list