[Spambayes] AssertionError: hamcount <= nham

Gerrit Holl gerrit at nl.linux.org
Wed Nov 19 12:42:13 EST 2003


Gerrit Holl wrote:
> whenever I untrain a spam message accidantly trained as ham, by
> database gets corrupted. I get the following error message:

Unfortunately, it also happens when I don't untrain any message.
It seems like the database gets corrupted whenever two different
processes open it. Do I have to manually configure lockfiles or
something similar?

The error message still is:
> 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

yours,
Gerrit.

-- 
62. If he do not plant the field that was given over to him as a
garden, if it be arable land (for corn or sesame) the gardener shall pay
the owner the produce of the field for the years that he let it lie
fallow, according to the product of neighboring fields, put the field in
arable condition and return it to its owner.
          -- 1780 BC, Hammurabi, Code of Law
-- 
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