473,584 Members | 2,802 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

py2exe, PyXML, and utf-16-be Error

I am using the XMLValidatePars er in the PyXML library
(xml.sax.sax2ex ts.XMLValParser Factory.make_pa rser). 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\sax2ex ts.pyc", line 13, in make_parser
File "xml\sax\saxext s.pyc", line 64, in make_parser
File "xml\sax\saxext s.pyc", line 42, in _create_parser
File "xml\sax\driver s2\drv_xmlproc. pyc", line 9, in ?
File "xml\parsers\xm lproc\xmlproc.p yc", line 14, in ?
File "xml\parsers\xm lproc\dtdparser .pyc", line 12, in ?
File "xml\parsers\xm lproc\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 2042
da************@ hotmail.com (David Brownell) writes:
I am using the XMLValidatePars er in the PyXML library
(xml.sax.sax2ex ts.XMLValParser Factory.make_pa rser). 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\sax2ex ts.pyc", line 13, in make_parser
File "xml\sax\saxext s.pyc", line 64, in make_parser
File "xml\sax\saxext s.pyc", line 42, in _create_parser
File "xml\sax\driver s2\drv_xmlproc. pyc", line 9, in ?
File "xml\parsers\xm lproc\xmlproc.p yc", line 14, in ?
File "xml\parsers\xm lproc\dtdparser .pyc", line 12, in ?
File "xml\parsers\xm lproc\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
2389
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: *************************************************************** ********** warning: py2exe: * The following modules were not found: warning: py2exe: * xml.sax warning: py2exe: * win32con warning:...
5
9098
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 distutils.core import setup import py2exe
12
5213
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 command line the --packages encodings but once i launch the exe file i receive this error in the console window: Traceback (most recent call last):...
8
4728
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 parsers found". This only happens when I run the ..EXE; it does not happen if I run the .PY file. When I'm running the .EXE this exception doesn't...
6
3940
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 Python 2.3) - PIL 1.1.4 - Installer or py2exe : latest versions.
0
1429
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 find that old versioons of PyXML on sourceforge any more...
1
1875
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 of Python (2.3.5) mentions PyXML as an additional library while discussing the DOM module...
5
2122
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 in xml.sax._exceptions. I thought DOM and SAX are two completely different things. Why is PyXML mixing them up like this? Thanks,
3
4019
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. After install the module xml.dom.ext.reader is not available, eventhough the folder, __init__py and everything is in place. Why? And could someone...
3
2670
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 choices? Thanks Astan -- "Formulations of number theory: Complete, Consistent, Non-trivial. Choose two." -David Morgan-Mar
0
7897
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8189
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8330
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7940
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8198
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5705
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3850
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1438
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.