[Mailman-Users] Hold.py fails in hold_for_approval

Mark Sapiro mark at msapiro.net
Fri Oct 1 07:04:18 CEST 2010


Morris Jones wrote:

>I recently discovered that all of my moderated posts have been failing, 
>most likely because my mailman version was older than my python version.
>
>This is the error:
>
>Sep 29 20:52:12 2010 (5588) Uncaught runner exception: unbound method 
>reason_notice() must be called with ModeratedMemberPost instance as 
>first argument (got nothing instead)
>Sep 29 20:52:12 2010 (5588) Traceback (most recent call last):
>   File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 111, in _oneloop
>     filebase)
>   File "/usr/lib/mailman/Mailman/Queue/Runner.py", line 169, in _onefile
>     'Dequeuing message destined for missing list: %s',
>   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/Moderate.py", line 67, in process
>     msgdata['sender'] = sender


Something is really wrong with this traceback. The above line actually
is line 67 in Mailman/Handlers/Moderate.py in all Mailman versions
since 2.1.9, but the actual lines that were executed here must have
been

                Hold.hold_for_approval(mlist, msg, msgdata,
                                       ModeratedMemberPost)

which are the lines following

                msgdata['sender'] = sender



>   File "/usr/lib/mailman/Mailman/Handlers/Hold.py", line 212, in 
>hold_for_approval
>     if usersubject:


Similarly here. The line that threw the exception must have been

    reason = Utils.wrap(exc.reason_notice())

which comes 10 lines later.


>TypeError: unbound method reason_notice() must be called with 
>ModeratedMemberPost instance as first argument (got nothing instead)
>
>Sep 29 20:52:12 2010 (5588) SHUNTING: 
>1285818731.142787+9ceab13e8549d5e6690de9b9880bef9c7c238b8d
>
>My python version is 2.6.2, and I've been very careful to be sure that 
>older pythons are not in the PATH.
>
>The first thing I did was update mailman to 2.1.14, which seemed to go 
>just fine, but I still see this error.  The timestamps of all the 
>executables are current, and were overwritten by the new versions.  The 
>"version' command reports 2.1.14.
>
>Actually ...
>
>I see now that the actual line of code changed after installing the new 
>version of mailman.  Where it used to be:
>
>     reason = Utils.wrap(exc.reason_notice())
>
>it's now ...
>
>     if usersubject:
>
>So it would appear that I need to get python to recompile all the pyc 
>files, is that correct?  How do I do that?  I tried touching the .py 
>files to make them newer ...



No. It appears that you didn't stop Mailman before installing 2.1.14
and then start it after. Try restarting Mailman now and see if that
helps


-- 
Mark Sapiro <mark at msapiro.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