py2exe, PyXML, and utf-16-be Error
Thomas Heller
theller at python.net
Mon Aug 23 14:44:33 EDT 2004
david_brownell at hotmail.com (David Brownell) writes:
> I am using the XMLValidateParser in the PyXML library
> (xml.sax.sax2exts.XMLValParserFactory.make_parser). When I run my
> script, everything works as expected.
>
> When I "compile" my script using py2exe, I get the following error
> when running the exe:
>
> Traceback (most recent call last):
> <my modules removed for brevity>
> File "xml\sax\sax2exts.pyc", line 13, in make_parser
> File "xml\sax\saxexts.pyc", line 64, in make_parser
> File "xml\sax\saxexts.pyc", line 42, in _create_parser
> File "xml\sax\drivers2\drv_xmlproc.pyc", line 9, in ?
> File "xml\parsers\xmlproc\xmlproc.pyc", line 14, in ?
> File "xml\parsers\xmlproc\dtdparser.pyc", line 12, in ?
> File "xml\parsers\xmlproc\xmlutils.pyc", line 43, in ?
> LookupError: unknown encoding: utf-16-be
>
> While using py2exe, I specify "--packages xml". Is there something
> else I need to specify to enable utf-16-be encoding?
I would guess "--packages xml,encodings" should do the trick.
Thomas
More information about the Python-list
mailing list