[Mailman-Developers] mailman error
Barry A. Warsaw
bwarsaw@cnri.reston.va.us (Barry A. Warsaw)
Sat, 27 Feb 1999 12:53:50 -0500 (EST)
>>>>> "GM" == Gergely Madarasz <gorgo@caesar.elte.hu> writes:
GM> Hello!
GM> What does this mean ?
GM> Feb 21 00:47:29 1999 mailcmd: Traceback (innermost last):
GM> mailcmd: File "/var/lib/mailman/scripts/mailcmd", line 52, in
GM> ? mailcmd: list.ParseMailCommands() mailcmd: File
GM> "/usr/lib/mailman/Mailman/MailCommandHandler.py", line 86, in
GM> ParseMailCommands mailcmd: sender =
GM> string.lower(mail.GetSender()) mailcmd: File
GM> "/usr/lib/mailman/Mailman/Message.py", line 122, in GetSender
GM> mailcmd: return string.lower(mail_address) mailcmd: TypeError
GM> : read-only buffer, None
GM> The mail command that triggered this message was a simple
GM> subscribe request... with a bad From: header, though From:
GM> Claudio Granatiero <@.>
Subscribing this type of address should no longer be allowed.
GM> Btw wouldn't it be nice if these tracebacks printed out the
GM> values of the variables, too ? :)
Well... In general, Guido discourages printing variable values in
tracebacks raised from builtin-functions, because all sorts of
problems can occur (recursive loops, errors in reprs). What you see
here is the next best thing: the *type* of the variable is printed.
More often than not, a variable is None when you don't expect it to
be, as in the case above. The type of None is <type 'None'> so
printing the type is usually all the information you need to figure
out the problem!
-Barry