[Spambayes]
[ spambayes-Bugs-693423 ] email message generates error in
pop3proxy.py
SourceForge.net
noreply at sourceforge.net
Fri Feb 28 08:39:56 EST 2003
Bugs item #693423, was opened at 2003-02-25 23:02
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=693423&group_id=61702
Category: pop3proxy
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: David Shaw (dshaw)
Assigned to: Tim Stone (timstone4)
Summary: email message generates error in pop3proxy.py
Initial Comment:
Hi all,
A friend of mine had a cache file in his "unknown" folder that caused the "review" web page in pop3proxy.py to generate the following traceback:
Traceback (most recent call last):
File "spambayes/Dibbler.py", line 398, in found_terminator
getattr(plugin, name)(**params)
File "pop3proxy.py", line 929, in onReview
judgement = judgement.split(';')[0].strip()
File "pop3proxy.py", line 815, in _makeMessageInfo
print type(text)
AttributeError: 'list' object has no attribute 'replace'
He sent me the offending message, and I replicated the problem:
msg = open("/Users/dshaw/Desktop/crash_spam.txt", "r")
message = mbox.get_message(msg)
part = typed_subpart_iterator(message, 'text', 'plain').next()
text = part.get_payload()
>>> text
[<email.Message.Message instance at 0x275ff0>]
So, instead of text, the payload is a list containing a single email message instance. Here are the objects' respective payloads:
>>> message._payload
[<email.Message.Message instance at 0x279290>, <email.Message.Message instance at 0x279160>, <email.Message.Message instance at 0x279e00>, <email.Message.Message instance at 0x280b10>, <email.Message.Message instance at 0x281340>, <email.Message.Message instance at 0x2828d0>, <email.Message.Message instance at 0x283300>, <email.Message.Message instance at 0x2b60a0>, <email.Message.Message instance at 0x27f4d0>, <email.Message.Message instance at 0x2b7c70>, <email.Message.Message instance at 0x2b9ac0>, <email.Message.Message instance at 0x2b8c30>, <email.Message.Message instance at 0x2bb770>, <email.Message.Message instance at 0x2bc180>]
----------------------------------------------------------------------
Comment By: David Shaw (dshaw)
Date: 2003-02-28 10:34
Message:
Logged In: YES
user_id=244639
Seems to be fixed! Thanks.
----------------------------------------------------------------------
Comment By: Tim Stone (timstone4)
Date: 2003-02-27 22:29
Message:
Logged In: YES
user_id=645698
I just checked in a fix for this problem. I have no ability to actually test it,
though. Please try your test case again and let me know the outcome.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=693423&group_id=61702
More information about the Spambayes
mailing list