Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > smtplib.SMTP "no attributes SMTP"

Reply
Thread Tools

smtplib.SMTP "no attributes SMTP"

 
 
Copelandia Cyanescens
Guest
Posts: n/a
 
      07-31-2004
Python Python 2.3.4, Windows, "clean" install, using the example code
given in the documentation, I get this...

Traceback (most recent call last):
File "C:\projects\email\email.py", line 24, in ?
server = smtplib.SMTP('mail.xxxxx.xxx')
AttributeError: 'module' object has no attribute 'SMTP'

I beg to differ, it most certainly does. Right?

TIA

--
"I spent several years in a North Vietnamese prison camp, in the
dark, fed with scraps. Do you think I want to do that all over
again as vice president of the United States?"

-- Sen. John McCain

 
Reply With Quote
 
 
 
 
Christos TZOTZIOY Georgiou
Guest
Posts: n/a
 
      07-31-2004
On Sat, 31 Jul 2004 13:32:59 -0400, rumours say that Copelandia
Cyanescens <(E-Mail Removed)> might have written:

>Python Python 2.3.4, Windows, "clean" install, using the example code
>given in the documentation, I get this...
>
>Traceback (most recent call last):
> File "C:\projects\email\email.py", line 24, in ?
> server = smtplib.SMTP('mail.xxxxx.xxx')
>AttributeError: 'module' object has no attribute 'SMTP'


Have you created a file smtplib.py somewhere in your python path?
Perhaps you named as such the file with the example code from the
documentation?

>I beg to differ, it most certainly does. Right?


Yes, the std lib smtlib.py does have an SMTP class.
--
TZOTZIOY, I speak England very best,
"Tssss!" --Brad Pitt as Achilles in unprecedented Ancient Greek
 
Reply With Quote
 
 
 
 
Copelandia Cyanescens
Guest
Posts: n/a
 
      07-31-2004
Christos TZOTZIOYGeorgiou wrote...

> On Sat, 31 Jul 2004 13:32:59 -0400, rumours say that Copelandia
> Cyanescens <(E-Mail Removed)> might have written:
>
>>Python Python 2.3.4, Windows, "clean" install, using the example code
>>given in the documentation, I get this...
>>
>>Traceback (most recent call last):
>> File "C:\projects\email\email.py", line 24, in ?
>> server = smtplib.SMTP('mail.xxxxx.xxx')
>>AttributeError: 'module' object has no attribute 'SMTP'

>
> Have you created a file smtplib.py somewhere in your python path?
> Perhaps you named as such the file with the example code from the
> documentation?


No, I saved the code as email.py... BUT... you hit the nail on the head
with the file name suggestion. The error disappears if I rename to
something like abcdef.py. I'll bet dollars to doughnuts that smtplib
references a module called email.py, huh? <grin>

Thanks! I knew it had to be something obvious and easy.

--
"I spent several years in a North Vietnamese prison camp, in the
dark, fed with scraps. Do you think I want to do that all over
again as vice president of the United States?"

-- Sen. John McCain

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
data attributes override method attributes? Jayden Python 16 09-29-2012 03:20 AM
attributes ala java annotations or .Net attributes? Kyle Schmitt Ruby 3 07-24-2007 07:48 PM
class attributes & data attributes james_027 Python 2 06-20-2007 03:12 PM
WebControl.Attributes.Add and custom attributes P4trykx ASP .Net 2 01-31-2007 04:33 PM
Parse reserved attributes as normal attributes Max XML 1 09-22-2006 12:04 PM



Advertisments