[ mailman-Bugs-1442801 ] ToDigest failing with missing attribute error

SourceForge.net noreply at sourceforge.net
Sat Mar 4 01:09:13 CET 2006


Bugs item #1442801, was opened at 2006-03-03 15:42
Message generated for change (Comment added) made by msapiro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1442801&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: mail delivery
Group: 2.1 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: David Carter (grandcross)
Assigned to: Nobody/Anonymous (nobody)
Summary: ToDigest failing with missing attribute error

Initial Comment:
One of my list queues has stopped sending messages due
to a missing method:

Mar 03 18:11:02 2006 (16865) Uncaught runner exception:
'str' object has no attribute 'get'
Mar 03 18:11:02 2006 (16865) Traceback (most recent
call last):
  File "/usr/lib/mailman/Mailman/Queue/Runner.py", line
110, in _oneloop
    self._onefile(msg, msgdata)
  File "/usr/lib/mailman/Mailman/Queue/Runner.py", line
160, in _onefile
    keepqueued = self._dispose(mlist, msg, msgdata)
  File
"/usr/lib/mailman/Mailman/Queue/IncomingRunner.py",
line 130, in _dispose
    more = self._dopipeline(mlist, msg, msgdata, pipeline)
  File
"/usr/lib/mailman/Mailman/Queue/IncomingRunner.py",
line 153, in _dopipeline
    sys.modules[modname].process(mlist, msg, msgdata)
  File "/usr/lib/mailman/Mailman/Handlers/ToDigest.py",
line 91, in process
    send_digests(mlist, mboxfp)
  File "/usr/lib/mailman/Mailman/Handlers/ToDigest.py",
line 132, in send_digests
    send_i18n_digests(mlist, mboxfp)
  File "/usr/lib/mailman/Mailman/Handlers/ToDigest.py",
line 217, in send_i18n_digests
    msgsubj = msg.get('subject', _('(no subject)'))
AttributeError: 'str' object has no attribute 'get'

Mar 03 18:11:02 2006 (16865) SHUNTING:
1141426524.2579081+81281f03f202e0386d5044adcef5083568986f9a

Digest mailbox has now gotten very large (> 4MB) so I
cant attach.

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

>Comment By: Mark Sapiro (msapiro)
Date: 2006-03-03 16:09

Message:
Logged In: YES 
user_id=1123998

This looks like Mailman 2.1.5 or earlier. This problem was
fixed in 2.1.6. At line 210 in your
Mailman/Handlers/ToDigest.py you will see

    while msg is not None:
        if msg == '':
            # It was an unparseable message
            msg = mbox.next()
        msgcount += 1

You need to add a continue so this becomes

    while msg is not None:
        if msg == '':
            # It was an unparseable message
            msg = mbox.next()
            continue
        msgcount += 1

In the mean time, if you don't mind having your digest out
of sequence, just move the digest.mbox aside. Then you can
patch ToDigest.py and straighten out the digest situation.
Note that you probably don't want to both run bin/unshunt
and replace the digest.mbox as that will result in
duplicates, but if messages haven't reached the list, you
need to run bin/unshunt to finish processing them.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=1442801&group_id=103


More information about the Mailman-coders mailing list