[Spambayes] -U bug?

Dmitry Karasik dmitry at karasik.eu.org
Sat Jul 19 01:56:01 EDT 2003


It's not over - I've just installed 1.0a4, but to find that the bug got 
scarier:

$ hammie.py -d -s untrain -U
Untraining spam (untrain):
     1Traceback (most recent call last):
  File "/usr/local/bin/hammie.py", line 6, in ?
    spambayes.hammiebulk.main()
  File "/usr/local/lib/python2.2/site-packages/spambayes/hammiebulk.py",
line 200, in main
    untrain(h, s, True)
  File "/usr/local/lib/python2.2/site-packages/spambayes/hammiebulk.py",
line 88, in untrain
    h.untrain(msg, is_spam)
  File "/usr/local/lib/python2.2/site-packages/spambayes/hammie.py",
line 168, in untrain
    self.bayes.unlearn(tokenize(msg), is_spam)
  File "/usr/local/lib/python2.2/site-packages/spambayes/classifier.py",
line 283, in unlearn
    self._remove_msg(wordstream, is_spam)
  File "/usr/local/lib/python2.2/site-packages/spambayes/classifier.py",
line 418, in _remove_msg
    raise ValueError("spam count would go negative!")
ValueError: spam count would go negative!
zsh: 19888 exit 1     hammie.py -d -s untrain -U

Any help please?

/Dmitry


Skip Montanaro wrote:
> 
>     Dmitry> I'm trying to use -U to untrain accidental ham, by running
>     Dmitry> spambayes v1.0a2 ( is it latest? )
> 
> Nope.  1.0a4 is the latest. 1.0a2 is pretty old
> 
>     Dmitry>     untrain(h, s, True)
>     Dmitry>   TypeError: 'int' object is not callable
> 
> Yes, this was fixed in June.
> 
> Skip



More information about the Spambayes mailing list