[Spambayes] [ spambayes-Bugs-693423 ] email message generates error in pop3proxy.py

SourceForge.net noreply at sourceforge.net
Tue Feb 25 21:03:20 EST 2003


Bugs item #693423, was opened at 2003-02-26 00:02
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=693423&group_id=61702

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: David Shaw (dshaw)
Assigned to: Nobody/Anonymous (nobody)
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>]


----------------------------------------------------------------------

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