[Mailman-Users] Message.OutgoingMessage ???

Mark Sapiro msapiro at value.net
Wed Oct 3 02:11:49 CEST 2007


Wolodja Wentland wrote:
>
>I am trying to do an upgrade on debian from mailman 2.1.5 to mailman
>2.1.9 and get the following error:
>
>--- snip ---
>Updating mailing list: <some_list>
>Traceback (most recent call last):
>  File "/var/lib/mailman/bin/withlist", line 297, in ?
>    main()
>  File "/var/lib/mailman/bin/withlist", line 272, in main
>    r = [do_list(listname, args, func) for listname in Utils.list_names()]
>  File "/var/lib/mailman/bin/withlist", line 194, in do_list
>    m = MailList.MailList(listname, lock=LOCK)
>  File "/var/lib/mailman/Mailman/MailList.py", line 130, in __init__
>    self.Load()
>  File "/var/lib/mailman/Mailman/MailList.py", line 665, in Load
>    self.CheckVersion(dict)
>  File "/var/lib/mailman/Mailman/MailList.py", line 718, in CheckVersion
>    Update(self, stored_state)
>  File "/var/lib/mailman/Mailman/versions.py", line 53, in Update
>    NewRequestsDatabase(l)
>  File "/var/lib/mailman/Mailman/versions.py", line 489, in NewRequestsDatabase
>    msg = Message.OutgoingMessage(text)
>AttributeError: 'module' object has no attribute 'OutgoingMessage'
>--- snip ---
>
>I had a look at the source code as distributed by debian and in the
>tarball from sourceforge. It seems like a bug to me that:


This appears to be some debian specific version of bin/update as our
update does not involve running any withlist scripts.

Also, this seems strange as it appears that the "Updating mailing list:
<some_list>" message comes from bin/update where it is looping through
the lists and in that list by list process has invoked some withlist
command on all lists.


>--- snip --- from versions.py (line 466 - 492)
>NewRequestsDatabase(l):
>    """With version 1.2, we use a new pending request database schema."""
>    r = getattr(l, 'requests', {})
>    if not r:
>        # no old-style requests
>        return
>    for k, v in r.items():
>
>        [ yadda yadda yadda ]
>
>            for p in v:
>                author, text = p[2]
>                reason = p[3]
>                msg = Message.OutgoingMessage(text)
>                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>                l.HoldMessage(msg, reason)
>            del r[k]
>        elif k == 'add_member':
>--- snip ---
>
>This code tries to build an object of type OutgoingMessage which is assumed
>to be declared in Mailman.Message but is not. There is no single class
>OutgoingMessage in the Message module.
>
>What is wrong here? What can i do about it? Why am i the first to
>encounter this problem???


What is wrong is the code doesn't work because there is no longer an
OutgoingMessage() class in the Mailman.Message module.

You are probably not the first to encounter this, but you are
encountering it because even though you are supposedly upgrading from
2.1.5 to 2.1.9, you have encountered a list that has a non-empty
'requests' attribute that hasn't been used since Mailman 1.x.

The same code existed in versions.py in Mailman 2.1.5 and there was no
Mailman.Message.OutgoingMessage() class then either, so the real
question is why didn't you encounter the error when you upgraded to
2.1.5 or maybe how did a 2.1.5 list get a non-empty 'requests'
attribute.

Note that the list that has the problem is probably not <some_list>
because of the withlist -a that's done in the processing of
<some-list>.

You could try something like

#!/bin/bash
for list in `bin/list_lists --bare`
do echo $list:
bin/dumpdb lists/${list}/config.pck | grep requests
done

to find the problem list.

-- 
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list