ascii codec missing under py2exe

M

Mark Hahn

I'm using the MIMEText module as part of sending email with no problem until
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 codecs
work.
 
V

vincent wehren

| I'm using the MIMEText module as part of sending email with no problem
until
| 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
codecs
| work.

Maybe this helps:

(From the py2exe homepage:
http://starship.python.net/crew/theller/py2exe/)
...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.

HTH

Vincent Wehren



|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top