[Tutor] Email module problem -- Bug ?

Sheila King sheila@thinkspot.net
Tue, 26 Feb 2002 20:25:11 -0800


On Tue, 26 Feb 2002 12:25:21 +0530, Prahlad Vaidyanathan <slime@vsnl.net>
wrote about [Tutor] Email module problem -- Bug ?:

> <error>
> Traceback (most recent call last):
>   File "/home/prahlad/bin/cartoons.py", line 256, in ?
>     mailEmAll(from_addr=frm, to_addrs=to)
>   File "/home/prahlad/bin/cartoons.py", line 249, in mailEmAll
>     s.sendmail(from_addr,to_addrs,outer.as_string(0))
>   File "/usr/local/lib/python2.2/email/Message.py", line 59, in as_string
>     g(self, unixfrom=unixfrom)
>   File "/usr/local/lib/python2.2/email/Generator.py", line 83, in __call__
>     self._write(msg)
>   File "/usr/local/lib/python2.2/email/Generator.py", line 104, in _write
>     self._dispatch(msg)
>   File "/usr/local/lib/python2.2/email/Generator.py", line 134, in _dispatch
>     meth(msg)
>   File "/usr/local/lib/python2.2/email/Generator.py", line 240, in _handle_multipart
>     for part in msg.get_payload():
>   File "/usr/local/lib/python2.2/email/Message.py", line 151, in __getitem__
>     return self.get(name)
>   File "/usr/local/lib/python2.2/email/Message.py", line 214, in get
>     name = name.lower()
> AttributeError: 'int' object has no attribute 'lower'
> </error>
> 
> Is this a bug ? 

I believe so. See these threads, from comp.lang.python and the tutor
archive:

http://groups.google.com/groups?hl=en&selm=a448mo.3vsj90f.1%40kserver.org

http://mail.python.org/pipermail/tutor/2002-February/012423.html

-- 
Sheila King
http://www.thinkspot.net/sheila/

"When introducing your puppy to an adult cat,
restrain the puppy, not the cat." -- Gwen Bailey,
_The Perfect Puppy: How to Raise a Well-behaved Dog_