[Tutor] smtplib broken in python 2.3?

Karl Pflästerer sigurd at 12move.de
Wed Mar 10 15:25:32 EST 2004


On 10 Mar 2004, Baker.Michael.B <- Michael.Baker at IGT.com wrote:
> ok in 2.2, but fail in 2.3:

> Traceback (most recent call last):
>   File "C:/Python23/email.py", line 1, in -toplevel-
>     from smtplib import *
>   File "C:\Python23\lib\smtplib.py", line 49, in -toplevel-
>     from email.base64MIME import encode as encode_base64
           ^^^^^

>   File "C:/Python23\email.py", line 19, in -toplevel-
                      ^^^^^

You gave your file the same name as a module which should be imported
(actually it's the name of the directory the files for the email package
live in).  That will cause problems (maybe in 2.4 it would run again if
the new Pep from Aahz according import gets included).

> what am i missing??? thanks in advance :)

Give your file another name and try it again.


   Karl
-- 
Please do *not* send copies of replies to me.
I read the list




More information about the Tutor mailing list