ascii codec missing under py2exe

vincent wehren vincent at
Fri Sep 12 07:22:11 CEST 2003

"Mark Hahn" <mark at> schrieb im Newsbeitrag
news:F6a8b.34398$S_.11374 at fed1read01...
| I'm using the MIMEText module as part of sending email with no problem
| I put it through py2exe.  Then I get this error:
|         LookupError: unknown encoding: ascii
| ... on this line ...
|         File "email\Encoders.pyc", line 85, in encode_7or8bit
| ... which looks like this ...
|         orig.encode('ascii')
| My guess is the ascii codec is not getting included in my build.  Can
| someone tell me how to fix this?  I know nothing about how these text
| work.

Maybe this helps:

(From the py2exe homepage:
..if your exe-file reports errors like LookupError: no codec search
functions registered: can't find encoding or LookupError: unknown encoding,
you should advise py2exe to include this package with the '--packages
encodings' command line option.


Vincent Wehren


More information about the Python-list mailing list