[Spambayes] Another Error on review page

David Shaw david at theresistance.net
Fri Feb 7 22:54:16 EST 2003

When trying to classify a message, I got the following error.  Is there 
any way to run the pop proxy interactively so you can "poke" it to see 
what data lives at self.nham that is causing the problem?  I use ZEO to 
do this in Zope and it's very helpful.

Traceback (most recent call last):

   File "spambayes/Dibbler.py", line 398, in found_terminator
     getattr(plugin, name)(**params)

   File "./pop3proxy.py", line 865, in onReview
     targetCorpus.takeMessage(id, state.unknownCorpus)

   File "spambayes/Corpus.py", line 201, in takeMessage

   File "spambayes/FileCorpus.py", line 143, in addMessage
     Corpus.Corpus.addMessage(self, message)

   File "spambayes/Corpus.py", line 136, in addMessage

   File "spambayes/storage.py", line 219, in onAddMessage

   File "spambayes/storage.py", line 227, in train
     self.bayes.learn(message.tokenize(), self.is_spam)

   File "spambayes/classifier.py", line 270, in learn
     self._add_msg(wordstream, is_spam)

   File "spambayes/classifier.py", line 389, in _add_msg
     self.nham += 1

TypeError: cannot concatenate 'str' and 'int' objects

On a related note, I wonder if there would be benefit in storing in 
ZODB rather than straight DBM/pickles (ZODB can use bsddb3 or pickles 
as well).

More information about the Spambayes mailing list