FAQ
Hello,

{First off thanks for a fantastic package...we've been using MM for
several years on bioperl.org}

I've got one list out of many on our MM server that has not processed a
new email since May 1st. The messages are apparently all in the shunt/
dir and running bin/unshunt just repeats the same traceback errors.

Tried googling, tried the archives and tried upgrading from 2.1 to 2.1.2
but I'm still having a serious problem with the bioperl-l at bioperl.org
mailing list. It also happens to be our biggest and most active list so
I'm starting to get a bit stressed.

Google searching on "shunt errors" and "TypeError: iterable argument
required" brought me to a page where it was suggested that there was a
unicode parsing bug that triggers when subscribers have 8-bit encoded chars.

I did find one subscriber who had funky chars in his "name" field and
deleted it via the web admin. Running "list_list" verified that the
subscriber list looks OK otherwise.

Sent a test message to the list and it still got shunted with a
traceback error message.

The message.pck file is attached. I'll happily supply the .db file if it
would be useful.

The actual traceback is this:
May 06 16:31:39 2003 (14914) Uncaught runner exception: iterable argument required
May 06 16:31:39 2003 (14914) Traceback (most recent call last):
File "/home/mailman/Mailman/Queue/Runner.py", line 105, in _oneloop
self._onefile(msg, msgdata)
File "/home/mailman/Mailman/Queue/Runner.py", line 155, in _onefile
keepqueued = self._dispose(mlist, msg, msgdata)
File "/home/mailman/Mailman/Queue/IncomingRunner.py", line 130, in _dispose
more = self._dopipeline(mlist, msg, msgdata, pipeline)
File "/home/mailman/Mailman/Queue/IncomingRunner.py", line 153, in _dopipeline
sys.modules[modname].process(mlist, msg, msgdata)
File "/home/mailman/Mailman/Handlers/ToDigest.py", line 89, in process
send_digests(mlist, mboxfp)
File "/home/mailman/Mailman/Handlers/ToDigest.py", line 130, in send_digests
send_i18n_digests(mlist, mboxfp)
File "/home/mailman/Mailman/Handlers/ToDigest.py", line 303, in send_i18n_digests
msg = scrubber(mlist, msg)
File "/home/mailman/Mailman/Handlers/Scrubber.py", line 257, in process
url = save_attachment(mlist, part, dir)
File "/home/mailman/Mailman/Handlers/Scrubber.py", line 349, in save_attachment
ext = guess_extension(ctype, fnext)
File "/home/mailman/Mailman/Handlers/Scrubber.py", line 80, in guess_extension
if ext in all:
TypeError: iterable argument required

May 06 16:31:39 2003 (14914) SHUNTING: 1052253095.709591+38e71a4dd22ea87b3961d1aa1c14d08e16d2683c

Any advice or pointers would be deeply appreciated.

Regards,
Chris
open-bio.org list admin





--
Chris Dagdigian, <dag at sonsorol.org>
BioTeam Inc. - Independent Bio-IT & Informatics consulting
Office: 617-666-6454, Mobile: 617-877-5498, Fax: 425-699-0193
PGP KeyID: 83D4310E Yahoo IM: craffi Web: http://bioteam.net

Search Discussions

  • Chris Dagdigian at May 7, 2003 at 7:02 pm
    Hello,

    I'm following up my own message because we seem to have resolved our
    issue with MM2.1.2 shunting messages with a "TypeError: iterable
    argument required" traceback.

    We re-created our list and got email flowing again which was our main
    concern. Andrew Dalke then had the time to check out the traceback
    errors and the messages that remaind in the shunt/ directory.

    He is suggesting a patch or a possible fix so I'm enclosing his entire
    message here:

    Our server is an ancient Alpha box running RedHat Linux 6.2 with a clean
    build of python 2.3.

    Mailman is 2.1.2 but since we've been using MM for years and
    upgrade-installing into the same directory I can't promise that our
    problems were not caused entirely by old cruft laying around....


    -Chris

    Here are the notes from Andrew:
    Actually, I didn't get your email about the shunt problem, I got it
    about the archive problem. So I'm sending this to you to let
    you forward to mailman developers in the proper context

    Here's the traceback

    Traceback (most recent call last):
    File "/home/mailman/Mailman/Queue/Runner.py", line 105, in _oneloop
    self._onefile(msg, msgdata)
    File "/home/mailman/Mailman/Queue/Runner.py", line 155, in _onefile
    keepqueued = self._dispose(mlist, msg, msgdata)
    File "/home/mailman/Mailman/Queue/IncomingRunner.py", line 130, in _dispose
    more = self._dopipeline(mlist, msg, msgdata, pipeline)
    File "/home/mailman/Mailman/Queue/IncomingRunner.py", line 153, in _dopipeline
    sys.modules[modname].process(mlist, msg, msgdata)
    File "/home/mailman/Mailman/Handlers/ToDigest.py", line 89, in process
    send_digests(mlist, mboxfp)
    File "/home/mailman/Mailman/Handlers/ToDigest.py", line 130, in send_digests
    send_i18n_digests(mlist, mboxfp)
    File "/home/mailman/Mailman/Handlers/ToDigest.py", line 303, in send_i18n_digests
    msg = scrubber(mlist, msg)
    File "/home/mailman/Mailman/Handlers/Scrubber.py", line 257, in process
    url = save_attachment(mlist, part, dir)
    File "/home/mailman/Mailman/Handlers/Scrubber.py", line 349, in save_attachment
    ext = guess_extension(ctype, fnext)
    File "/home/mailman/Mailman/Handlers/Scrubber.py", line 80, in guess_extension
    if ext in all:
    TypeError: iterable argument required

    It occurs when Scrubber.guess_extension . The code does

    all = guess_all_extensions(ctype, strict=0)
    if ext in all:
    return ext
    return all and all[0]

    The function 'guess_all_extensions' comes from the top of the
    files from the section

    try:
    from mimetypes import guess_all_extensions
    except ImportError:
    import mimetypes
    def guess_all_extensions(ctype, strict=1):
    # BAW: sigh, guess_all_extensions() is new in Python 2.3

    We're running Python 2.3, which means we're using the
    one from mimetypes. That function's docstring says

    guess_type(). If no extension can be guessed for `type', None
    is returned.

    So if no extension can be guessed, then Scrubber.guess_extension
    try to iterate over None, which fails

    Our fix to get things working again is

    all = guess_all_extensions(ctype, strict=0)
    if all is None: all = []
    if ext in all:
    return ext
    return all and all[0]

    However, another possibility is that the guess_all_extensions
    in Python 2.3's mimetypes should return [] when it cannot
    guess, rather than a None. I would be happier with that
    solution than this patch, but will leave it up to the Mailman
    and Python people to decide on the appropriate solution.

    Andrew Dalke
    dalke at dalkescientific.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedMay 6, '03 at 8:38p
activeMay 7, '03 at 7:02p
posts2
users1
websitelist.org

1 user in discussion

Chris Dagdigian: 2 posts

People

Translate

site design / logo © 2022 Grokbase