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>]
crash spam
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.
Logged In: YES
user_id=244639
Seems to be fixed! Thanks.
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.