Importing XML modules in py2exe or Installer?

Thomas Heller thomas.heller at ion-tof.com
Fri Jul 20 06:00:55 EDT 2001


"Gordon McMillan" <gmcm at hypernet.com> wrote in message news:Xns90E25BD095F65gmcmhypernetcom at 199.171.54.154...
> [posted and mailed]
>
> Gustaf Liljegren wrote:
>
> [snip]
>
> > E:\jane>jane
> > Traceback (most recent call last):
> >   File "<string>", line 54, in ?
> >   File "friend.pyc", line 22, in __init__
> >   File "friend.pyc", line 49, in getName
> > LookupError: unknown encoding
>
> This will probably clear up if you force
> the "encodings" package into the build.
>
True.

For other people having similar problems:

Gustaf (the original poster) can now freeze his app
with the command line:

python setup.py py2exe -p xml -i encodings.latin_1 -e win32api

He removed PyXML before because he didn't need it.
There's way too much (import) magic going on in PyXML,
such a simple approach does not work.

Still the whole xml package must be included (-p xml)
because otherwise no parsers are found.
'-i encodings.latin_1' includes the latin_1 encoding,
which is the only one he is using.

Thomas





More information about the Python-list mailing list