On Fri, Aug 28, 2009 at 3:00 PM, Marc<m...@marcd.org> wrote: > Hello, > > > > I am trying to code an email alert and am running into the following error: > > Connecting to server > > Traceback (most recent call last): > > File "C:\Users\Marc1\Documents\Python\email test\email.py", line 1, in > <module> > > import smtplib > > File "C:\Python26\lib\smtplib.py", line 46, in <module> > > import email.utils > > File "C:\Users\Marc1\Documents\Python\email test\email.py", line 12, in > <module> > > s = smtplib.SMTP('smtp.marcd.org') > > AttributeError: 'module' object has no attribute 'SMTP'
Your file 'email.py' is hiding the std lib 'email' module and this is creating a circular import and basically a mess :-) Try calling your program something else. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor