[spambayes-bugs] [ spambayes-Bugs-948623 ] sb_mboxtrain.py -
traceback on bad message
SourceForge.net
noreply at sourceforge.net
Wed May 5 16:54:14 EDT 2004
Bugs item #948623, was opened at 2004-05-06 05:29
Message generated for change (Comment added) made by anadelonbrin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=948623&group_id=61702
Category: hammie
Group: Source code 1.0b1
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jeff Balderson (twstdpear)
Assigned to: Nobody/Anonymous (nobody)
Summary: sb_mboxtrain.py - traceback on bad message
Initial Comment:
I'm getting a traceback in sb_mboxtrain.py when updaing
the DB. The error occurs with both 1.0b1 and 1.0a7.
I've isolated the message that causes the problem in
its own mbox, and attached it to this bug report. The
traceback (names have been changed to protect the
innocent :) follows:
[user at host user]$ sb_mboxtrain.py -d
/home/user/.hammiedb -s mail/badmail3
Training spam (mail/badmail3):
Reading as Unix mbox
Traceback (most recent call last):
File "/usr/bin/sb_mboxtrain.py", line 351, in ?
main()
File "/usr/bin/sb_mboxtrain.py", line 342, in main
train(h, s, True, force, trainnew, removetrained)
File "/usr/bin/sb_mboxtrain.py", line 266, in train
mbox_train(h, path, is_spam, force)
File "/usr/bin/sb_mboxtrain.py", line 193, in mbox_train
outf.write(msg.as_string(True))
File
"/usr/lib/python2.2/site-packages/email/Message.py",
line 109, in as_string
g.flatten(self, unixfrom=unixfrom)
File
"/usr/lib/python2.2/site-packages/email/Generator.py",
line 102, in flatten
self._write(msg)
File
"/usr/lib/python2.2/site-packages/email/Generator.py",
line 130, in _write
self._dispatch(msg)
File
"/usr/lib/python2.2/site-packages/email/Generator.py",
line 156, in _dispatch
meth(msg)
File
"/usr/lib/python2.2/site-packages/email/Generator.py",
line 199, in _handle_text
raise TypeError, 'string payload expected: %s' %
type(payload)
TypeError: string payload expected: <type 'list'>
----------------------------------------------------------------------
>Comment By: Tony Meyer (anadelonbrin)
Date: 2004-05-06 08:54
Message:
Logged In: YES
user_id=552329
There are a few of these about now. The message is
multipart but identifies itself as text/plain, so the email
package chokes.
1.0rc1 (the announcement should be out today) should have
this fixed for all the SpamBayes apps - sb_filter &
sb_mboxtrain should handle it even better than
sb_server/imapfilter at this stage. I think Skip's fix also
allows sb_mboxtrain to continue on in this situation, rather
than choke & die.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=948623&group_id=61702
More information about the Spambayes-bugs
mailing list