Hello!
What does this mean ?
Feb 21 00:47:29 1999 mailcmd: Traceback (innermost last): mailcmd: File "/var/lib/mailman/scripts/mailcmd", line 52, in ? mailcmd: list.ParseMailCommands() mailcmd: File "/usr/lib/mailman/Mailman/MailCommandHandler.py", line 86, in ParseMailCommands mailcmd: sender = string.lower(mail.GetSender()) mailcmd: File "/usr/lib/mailman/Mailman/Message.py", line 122, in GetSender mailcmd: return string.lower(mail_address) mailcmd: TypeError : read-only buffer, None
The mail command that triggered this message was a simple subscribe request... with a bad From: header, though From: Claudio Granatiero <@.>
Btw wouldn't it be nice if these tracebacks printed out the values of the variables, too ? :)
-- Madarasz Gergely gorgo@caesar.elte.hu gorgo@linux.rulez.org Egy pingvinre gyakorlatilag lehetetlen haragosan nezni. HuLUG: http://mlf.linux.rulez.org/
"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
participants (2)
-
Barry A. Warsaw
-
Gergely Madarasz