[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

cx_Freeze : LookupError: unknown encoding: ascii

Rakesh

3/1/2008 10:40:00 PM

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.
2 Answers

Martin v. Loewis

3/1/2008 11:42:00 PM

0

> 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

Rakesh

3/2/2008 7:57:00 PM

0

On Mar 1, 3:41 pm, "Martin v. Löwis" <mar...@v.loewis.de> wrote:
> > 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


Thanks Martin.

Adding something like

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

fixed the issue.