Menu

#153 please provide some locking mechanism

open-invalid
nobody
None
2
2014-07-13
2005-02-23
No

Hello.

sb_filter crashes when it receives some lines.

Here's my output:

(fenio@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@domek)~/Mail/debian-security/cur$head -1
1109110296.7674_3.on:2,S
Return-Path:
<bounce-debian-security=fenio=o2.pl@lists.debian.org>
(fenio@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@domek)~/Mail/debian-security/cur$

Any hints what should I make with this?

Discussion

  • Tony Meyer

    Tony Meyer - 2005-02-23

    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.

     
  • Tony Meyer

    Tony Meyer - 2005-02-23
    • status: open --> closed-invalid
     
  • Bartosz Fe&#324;ski

    • summary: sb_filter doesn't work --> please provide some locking mechanism
    • priority: 5 --> 2
    • status: closed-invalid --> open-invalid
     
  • Bartosz Fe&#324;ski

    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

     
  • Tony Meyer

    Tony Meyer - 2005-02-25
    • labels: 455701 -->
    • milestone: 334738 -->
     
  • Tony Meyer

    Tony Meyer - 2005-02-25

    Logged In: YES
    user_id=552329

    (Changing to RFE)

     

Log in to post a comment.