[ mailman-Bugs-1099138 ] Scrubber.py traceback
Bugs item #1099138, was opened at 2005-01-09 17:36 Message generated for change (Comment added) made by bwarsaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1099138&group_id=103 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Resolution: Fixed Priority: 5 Submitted By: Owen Taylor (otaylor) Assigned to: Nobody/Anonymous (nobody) Summary: Scrubber.py traceback Initial Comment: Outgoing mail on one of our lists on mail.gnome.org was being held up because of a error that was occuring sending out digests. Jan 09 16:07:24 2005 (22410) Uncaught runner exception: len() of unsized object Jan 09 16:07:24 2005 (22410) Traceback (most recent call last): File "/var/mailman/Mailman/Queue/Runner.py", line 111, in _oneloop self._onefile(msg, msgdata) File "/var/mailman/Mailman/Queue/Runner.py", line 167, in _onefile keepqueued = self._dispose(mlist, msg, msgdata) File "/var/mailman/Mailman/Queue/IncomingRunner.py", line 130, in _dispose more = self._dopipeline(mlist, msg, msgdata, pipeline) File "/var/mailman/Mailman/Queue/IncomingRunner.py", line 153, in _dopipeline sys.modules[modname].process(mlist, msg, msgdata) File "/var/mailman/Mailman/Handlers/ToDigest.py", line 91, in process send_digests(mlist, mboxfp) File "/var/mailman/Mailman/Handlers/ToDigest.py", line 132, in send_digests send_i18n_digests(mlist, mboxfp) File "/var/mailman/Mailman/Handlers/ToDigest.py", line 306, in send_i18n_digests msg = scrubber(mlist, msg) File "/var/mailman/Mailman/Handlers/Scrubber.py", line 262, in process size = len(payload) TypeError: len() of unsized object Unfortunately, I don't know what mail was triggering this... was trying to get the mailing list going and didn't want to spend a lot of time investigating. It's also not immediately clear to me how payload could end up as None there... from reading the code in email.Message maybe part._payload was None due to an earlier problem. I'll attach a workaround patch... the if: also covers the call to save_attachment() since that also tracebacked when I just fixed the call to len(). Anyways, filing in case it makes sense to someone more familiar with the guts of email.Message. ----------------------------------------------------------------------
Comment By: Barry A. Warsaw (bwarsaw) Date: 2005-05-22 16:19
Message: Logged In: YES user_id=12800 I figured this one out and the patch should be in 2.1.6 final. Under email 2.5, it is possible to get a message with a None payload. len(None) will produce the above error. I believe it is safe to ignore such parts and that is the fix I've checked into CVS. Note that under email 3 (which Mailman can't use until Python 2.3 is a minimum requirement), you won't get those None payloads. ---------------------------------------------------------------------- Comment By: Tokio Kikuchi (tkikuchi) Date: 2005-01-11 23:11 Message: Logged In: YES user_id=67709 I believe I fixed this bug. it will appear in public CVS soon. ---------------------------------------------------------------------- Comment By: Owen Taylor (otaylor) Date: 2005-01-11 21:59 Message: Logged In: YES user_id=63124 Sorry about that ... that's what happens when you work on multiple computers and call patches things like 'diff'. ---------------------------------------------------------------------- Comment By: Tokio Kikuchi (tkikuchi) Date: 2005-01-11 21:34 Message: Logged In: YES user_id=67709 Well, the patch looks like for different project?? ---------------------------------------------------------------------- Comment By: Owen Taylor (otaylor) Date: 2005-01-09 18:15 Message: Logged In: YES user_id=63124 Oh, forgot to add say, this is python-2.2.3 and mailman-2.1.5. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1099138&group_id=103
participants (1)
-
SourceForge.net