473,394 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

py2exe, PyXML, and utf-16-be Error

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?

Thanks in advance for your help!
David Brownell
Jul 18 '05 #1
2 2032
da************@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
Jul 18 '05 #2
Thanks, Thomas, that did the trick.
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
I want a binnary file to my aplicattion, but py2exe don't match the xmll.sax module. the py2exe shows this errors: warning: py2exe:...
5
by: Giles Brown | last post by:
I'm feeling quite dumb this morning. I'm trying to build a COM server DLL using py2exe and it ain't working. Here's what ain't working... setup_dll.py based on py2exe sample: """from...
12
by: Alessandro Crugnola *sephiroth* | last post by:
Hi, i'm trying to compile a .py script using py2exe into a win .exe file. In that script i'm using xml.dom.minidom to parse an xml file (with the iso8859-1 encoding) i've included in the setup...
8
by: Kathleen Kudzma | last post by:
Does anyone know how to resolve the following problem that I'm getting in Python 2.2 and 2.3? PROBLEM: When I try to create a classReader object I get an exception: "SAXReaderNotAvailable: No...
6
by: Luc Saffre | last post by:
Hello, I had a strange problem when freezing (using either py2exe or McMillan installer) a script that imports reportlab (which imports PIL (which imports FixTk))). - Python 2.3.3c (also with...
0
by: leo | last post by:
hi there i want to write a little SOAP client and thought about using ZSI. now i have read that ZSI only works with PyXML versions later than 0.6 and earlier than 0.7. unfortunaltly i can...
1
by: Dan | last post by:
I'm writing a Python program that does some XML parsing, though nothing heavy, and I want to avoid requiring the user to install additional libraries like PyXML. The documentation for my version...
5
by: Matthias Kaeppler | last post by:
Hi, I have to say I am confused about the documentation on pyxml.sf.net. When I want to use DOM, I effectively am using a class called Sax2? ^^ I also have to catch SAXExceptions, which reside...
3
by: Thomas W | last post by:
I've tried to install the pyxml-package, available at http://pyxml.sourceforge.net/, both from source and using some hack on the win32-binary package available for python2.4, but without luck....
3
by: Astan Chee | last post by:
Hi, I was just wondering if there is a equivalent of py2exe on linux (centOS) and mac (OS X). I have a python script that uses wx and I dont want to install wx on linux/mac machines. What are my...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.