Discussion:
ImportError: cannot import name Encoders
Mark Carter
2003-03-13 13:35:26 UTC
Permalink
I'm using:
Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32

I tried the email example in section 12.2.10, which begins:

import smtplib

# Here are the email pacakge modules we'll need
from email import Encoders
from email.MIMEText import MIMEText

... etc.

but I get the error message:
ImportError: cannot import name Encoders

Is this a bug?
If not, then what's going on?

Thanks in advance.
Mark Carter
2003-03-14 12:05:38 UTC
Permalink
Post by Mark Carter
ImportError: cannot import name Encoders
Works fine here with 2.2.2. Looks like your Python standard library
wasn't installed properly.
Hmmm. I installed Python in the standard way. The file Encoders.py
exists in the directory c:\Python22\Lib\email. Isn't that where it should be?
Erik Max Francis
2003-03-13 23:45:03 UTC
Permalink
Post by Mark Carter
ImportError: cannot import name Encoders
Is this a bug?
If not, then what's going on?
Works fine here with 2.2.2. Looks like your Python standard library
wasn't installed properly.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ The love we give away is the only love we keep.
\__/ Elbert Hubbard
Kepler's laws / http://www.alcyone.com/max/physics/kepler/
A proof of Kepler's laws.
Loading...