Importing XML modules in py2exe or Installer?
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 18.104.22.168...
> [posted and mailed]
> Gustaf Liljegren wrote:
> > 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.
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.
More information about the Python-list