

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
1 message in org.python.python-bugs-list[ python-Bugs-736407 ] Problem With e...| From | Sent On | Attachments |
|---|---|---|
| SourceForge.net | Mar 22, 2004 6:35 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [ python-Bugs-736407 ] Problem With email.MIMEText Package | Actions... |
|---|---|---|
| From: | SourceForge.net (nore...@sourceforge.net) | |
| Date: | Mar 22, 2004 6:35:35 am | |
| List: | org.python.python-bugs-list | |
Bugs item #736407, was opened at 2003-05-12 09:41 Message generated for change (Comment added) made by judasiscariot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=736407&group_id=5470
Category: Python Library Group: Python 2.3
Status: Open
Resolution: None Priority: 5 Submitted By: John Abel (judasiscariot) Assigned to: Barry A. Warsaw (bwarsaw) Summary: Problem With email.MIMEText Package
Initial Comment: Problem with email.MIMEText. I created a MIMEText message (following the example in the documentation). The problem occurs when as_string() is called. This is the traceback:
File "/usr/local/lib/python2.3/email/Message.py", line 113, in as_string g.flatten(self, unixfrom=unixfrom) File "/usr/local/lib/python2.3/email/Generator.py", line 102, in flatten self._write(msg) File "/usr/local/lib/python2.3/email/Generator.py", line 137, in _write self._write_headers(msg) File "/usr/local/lib/python2.3/email/Generator.py", line 183, in _write_headers header_name=h, continuation_ws='\t').encode() File "/usr/local/lib/python2.3/email/Header.py", line 415, in encode return self._encode_chunks(newchunks, maxlinelen) File "/usr/local/lib/python2.3/email/Header.py", line 375, in _encode_chunks _max_append(chunks, s, maxlinelen, extra) File "/usr/local/lib/python2.3/email/quopriMIME.py", line 84, in _max_append L.append(s.lstrip()) AttributeError: 'list' object has no attribute 'lstrip'
I'm using 2.3b1, on RH9. The same piece of code works with 2.2.2.
----------------------------------------------------------------------
Comment By: John Abel (judasiscariot)
Date: 2004-03-22 11:35
Message: Logged In: YES user_id=221478
OK, stripped everything down to a minimum. I now have a class, based upon the example from the email docs. It still gives the same error, when mailMessage.as_string() is called.
----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw) Date: 2003-11-21 20:29
Message: Logged In: YES user_id=12800
There have no follow ups to this message in months, so I'm moving it to Pending status.
----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw) Date: 2003-09-03 12:15
Message: Logged In: YES user_id=12800
Sorry, but you're going to have to work harder at trying to boil down the buggy code. When I run ServerMonitor.py, I get an immediate traceback
Traceback (most recent call last): File "ServerMonitor.py", line 18, in ? import ThreadUtils, NetMon ImportError: No module named ThreadUtils
Here's one thing you can try to do: catch the exception in your code, then pickle the Message object up and post the pickle. I can at least reconstitute the pickle and look at the structure.
Also, I'm guessing the problem is somewhere in ProcessMail() in PostITControl.py. Be sure that the mailBody argument is a string and nothing else.
----------------------------------------------------------------------
Comment By: John Abel (judasiscariot) Date: 2003-05-21 08:16
Message: Logged In: YES user_id=221478
The Config.ini will need to modifying to suit your machine settings. Run the ServerMonitor.py, and then run PostITControl.py. PostITControl.py crashes when trying to send a mail.
----------------------------------------------------------------------
Comment By: John Abel (judasiscariot) Date: 2003-05-21 08:13
Message: Logged In: YES user_id=221478
Sorry, been trying to narrow the code down. If I have a bare minimum script, it works, yet the original still fails. I'll upload the required files (3).
----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw) Date: 2003-05-19 19:59
Message: Logged In: YES user_id=12800
I'm moving this to Pending since wthout more information I can't help. This starts the 14 day clock ticking. After 2 weeks this bug report will be closed, unless someone follows up with more information.
----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw) Date: 2003-05-15 14:07
Message: Logged In: YES user_id=12800
Sorry, the attached code sample is incomplete. It is not sufficient for me to reproduce the problem.
Please boil down your example to a self-contained -- but as small as possible -- example.
----------------------------------------------------------------------
Comment By: John Abel (judasiscariot) Date: 2003-05-15 09:32
Message: Logged In: YES user_id=221478
Sorry, forgot the comment. When running the script using python2.2 (email 2.4.3), I don't receive any errors, mail gets sent. It only seems to happen with 2.3b.
----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw) Date: 2003-05-13 15:45
Message: Logged In: YES user_id=12800
Can you upload the exact code that you wrote that caused this crash? Please don't paste it.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=736407&group_id=5470







