[Spambayes] AssertionError: hamcount <= nham
Gerrit Holl
gerrit at nl.linux.org
Wed Nov 19 06:54:24 EST 2003
Hi,
whenever I untrain a spam message accidantly trained as ham, by
database gets corrupted. I get the following error message:
Traceback (most recent call last):
File "/usr/local/bin/sb_filter.py", line 203, in ?
main()
File "/usr/local/bin/sb_filter.py", line 199, in main
action(msg)
File "/usr/local/bin/sb_filter.py", line 132, in filter
return h.filter(msg)
File "/usr/local/lib/python2.3/site-packages/spambayes/hammie.py", line 109, in filter
prob, clues = self._scoremsg(msg, True)
File "/usr/local/lib/python2.3/site-packages/spambayes/hammie.py", line 38, in _scoremsg
return self.bayes.spamprob(tokenize(msg), evidence)
File "/usr/local/lib/python2.3/site-packages/spambayes/classifier.py", line 158, in chi2_spamprob
clues = self._getclues(wordstream)
File "/usr/local/lib/python2.3/site-packages/spambayes/classifier.py", line 395, in _getclues
prob = self.probability(record)
File "/usr/local/lib/python2.3/site-packages/spambayes/classifier.py", line 242, in probability
assert hamcount <= nham
AssertionError
It makes no difference whether I use DataBase or pickle format.
Is there any solution apart from restarting the whole database?
This would mean I would have to restart the whole database after
each erroneous training. The latter is what I'm doing now :(
yours,
Gerrit.
--
Asperger Syndroom - een persoonlijke benadering:
http://people.nl.linux.org/~gerrit/
Kom in verzet tegen dit kabinet:
http://www.sp.nl/
More information about the Spambayes
mailing list