[Mailman-Users] Mailman 2.1.1 crashing when approving a newmember

Sylvain Langlade sylvain at adv-informatique.fr
Thu Apr 17 10:35:42 CEST 2003


> Are you running your list in French or some other language?

Yes, there are french custom messages (in the description, info,
welcome_msg, goodbye_msg fields) but with no accentuation and other strange
french things. In fact there were some problems with apostroph (')
characters because there were copied directly from MS Word and were
non-standard. But they simply appeared as &#xxxx; codes in the text. I then
removed every accentuation and bizar chars.

> It would be
> really helpful to know what 'msg' and 'self.__encoding' is here.  Try
> adding something like the following right before the failing line:
>
> 	fp = open('/tmp/bug.txt')
> 	print >> fp, repr(msg)
> 	print >> fp, self.__encoding
> 	fp.close()
>
> Then mail us the contents of /tmp/bug.txt
>
> -Barry

Ouch! Me nicht comprendo Python. I did add this block (searching some block
delimiters... :-) But the bug.txt file remains empty! I'm sure that my
modified version is running because Python barfed when I didn't respect
indentations.

So I added some strings all around : still getting no output and an empty
non-modified file. The exact code block follows :

    def write(self, msg):
        if isinstance(msg, StringType):
            fp = open('/tmp/bug-mailman.txt')
            print >> fp, '==============='
            print >> fp, repr(msg)
            print >> fp, '---'
            print >> fp, self.__encoding
            print >> fp, '^^^^^^^^^^^^^^^'
            fp.close()
            msg = unicode(msg, self.__encoding)
        f = self.__get_f()
        try:
            f.write(msg)
        except IOError, msg:
            _logexc(self, msg)

What's weird is that if I remove the /tmp/bug-mailman.txt file, I get an
Internal server error on my browser and a nice IOError "No such file or
directory" on the console, proving it does try and access the file.

If I re-create the file, I go back to my standard "We've hit a bug" webpage
and nothing at all in the file.

Any idea ?

Ps : Damn, I really wish I had some Python background...




More information about the Mailman-Users mailing list