cx_Freeze : LookupError: unknown encoding: ascii

R

Rakesh Kumar

Hi -
I created a binary using the cx_Freeze utility on Linux (wxWidgets
2.8 / Python 2.5/ Mandriva 2008 ).

When I tried to run the binary - this is the error that I got on the
console.

File "gdataapi.py", line 44, in __init__
self.service.ProgrammaticLogin()
File "/opt/software/gdata-py/src/gdata/service.py", line 284, in
ProgrammaticLogin
auth_connection.putrequest('POST', '/accounts/ClientLogin')
File "/usr/lib/python2.5/httplib.py", line 806, in putrequest
host_enc = self.host.encode("ascii")
LookupError: unknown encoding: ascii


Can somebody point to some clues about options that need to be passed
to FreezePython API to get the right executable.

Thanks for the help.
 
M

Martin v. Löwis

Can somebody point to some clues about options that need to be passed
to FreezePython API to get the right executable.

You need to tell it to include the encodings.ascii module.

Regards,
Martin
 
R

Rakesh Kumar

You need to tell it to include the encodings.ascii module.

Regards,
Martin


Thanks Martin.

Adding something like

./freeze --include-modules=encodings.ascii,encodings.utf_8 <source>

fixed the issue.
 

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

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top