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

>Category: None
>Group: None
Status: Open
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:

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

Normal line which should work
([EMAIL PROTECTED])~/Mail/debian-security/cur$head -1
1109110296.7674_3.on:2,S
Return-Path:
<[EMAIL PROTECTED]>
([EMAIL PROTECTED])~/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
([EMAIL PROTECTED])~/Mail/debian-security/cur$

Any hints what should I make with this?

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

>Comment By: Tony Meyer (anadelonbrin)
Date: 2005-02-25 14:52

Message:
Logged In: YES 
user_id=552329

(Changing to RFE)

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

Comment By: Bartosz Fe&#324;ski (fenio)
Date: 2005-02-25 00: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 12: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=498106&aid=1149648&group_id=61702
_______________________________________________
Spambayes-bugs mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-bugs

Reply via email to