473,385 Members | 1,342 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,385 software developers and data experts.

py2exe & pyxml

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 happen immediately. It happens as soon as I try to
create a classReader object.

Please see the warnings that I get below when I create the .EXE:
**********
warning: py2exe: * The following modules were not found: warning: py2exe:
* Carbon.Folder warning: py2exe: * Carbon.Folders warning: py2exe: *
DateTime warning: py2exe: * Ft.Lib warning: py2exe: *
Ft.Lib.DumpBgTuple warning: py2exe: * Ft.__init__ warning: py2exe: *
SOCKS warning: py2exe: * XPathParserc warning: py2exe: *
ext.IsDOMString warning: py2exe: * ext.SplitQName warning: py2exe: *
fcntl warning: py2exe: * ic warning: py2exe: * mx.DateTime warning:
py2exe: * rourl2path warning: py2exe: * xml.xslt warning: py2exe: *
xml.xslt.ParsedPattern warning: py2exe:
************************************************ ***************


__________________________________________________ _______________
Try MSN Messenger 6.0 with integrated webcam functionality!
http://www.msnmessenger-download.com...g/reach_webcam
Jul 18 '05 #1
8 4711
"Kathleen Kudzma" <km******@hotmail.com> writes:
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 happen immediately. It
happens as soon as I try to create a classReader object.


You have to explicitly ask py2exe to include pyexpat in the
executable. RTFM.

Regards,
Martin
Jul 18 '05 #2

"Kathleen Kudzma" <km******@hotmail.com> wrote in message
news:ma**********************************@python.o rg...
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 happen immediately. It happens as soon as I try to
create a classReader object.

Please see the warnings that I get below when I create the .EXE:
**********
warning: py2exe: * The following modules were not found: warning: py2exe:
* Carbon.Folder warning: py2exe: * Carbon.Folders warning: py2exe: *
DateTime warning: py2exe: * Ft.Lib warning: py2exe: *
Ft.Lib.DumpBgTuple warning: py2exe: * Ft.__init__ warning: py2exe: *
SOCKS warning: py2exe: * XPathParserc warning: py2exe: *
ext.IsDOMString warning: py2exe: * ext.SplitQName warning: py2exe: *
fcntl warning: py2exe: * ic warning: py2exe: * mx.DateTime warning:
py2exe: * rourl2path warning: py2exe: * xml.xslt warning: py2exe: *
xml.xslt.ParsedPattern warning: py2exe:
************************************************ ***************


Yes, I've just had the same problem -- using py3.2 and py2exe v0.4.2

After spending some time in a debugger following the execution path, I found
out that the module xml.sax.drivers2.drv_pyexpat is the one that is missing.
It gets loaded through a call to __import__ (see _xmlplus.sax.saxexts.py, line
42) which is why py2exe doesn't pick it up as being necessary.

All of which means it has to be explicitly included in the build. So, I was
able to solve the problem with the following setup.py command line:

python setup.py py2exe --includes xml.sax.drivers2.drv_pyexpat

I've no idea what Martin was referring to when he said RTFM, because I could
find nothing about this. (Then again, perhaps I'm misunderstanding what he
means by RTFM?)

--
Mike

Jul 18 '05 #3
"Mike Thompson" <none by e-mail> wrote in message news:<3f***********************@news.optusnet.com. au>...
"Kathleen Kudzma" <km******@hotmail.com> wrote in message
news:ma**********************************@python.o rg...
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 happen immediately. It happens as soon as I try to
create a classReader object.

Please see the warnings that I get below when I create the .EXE:
**********
>warning: py2exe: * The following modules were not found: warning: py2exe:
>* Carbon.Folder warning: py2exe: * Carbon.Folders warning: py2exe: *
>DateTime warning: py2exe: * Ft.Lib warning: py2exe: *
>Ft.Lib.DumpBgTuple warning: py2exe: * Ft.__init__ warning: py2exe: *
>SOCKS warning: py2exe: * XPathParserc warning: py2exe: *
>ext.IsDOMString warning: py2exe: * ext.SplitQName warning: py2exe: *
>fcntl warning: py2exe: * ic warning: py2exe: * mx.DateTime warning:
>py2exe: * rourl2path warning: py2exe: * xml.xslt warning: py2exe: *
>xml.xslt.ParsedPattern warning: py2exe:
>************************************************ ***************


Yes, I've just had the same problem -- using py3.2 and py2exe v0.4.2

After spending some time in a debugger following the execution path, I found
out that the module xml.sax.drivers2.drv_pyexpat is the one that is missing.
It gets loaded through a call to __import__ (see _xmlplus.sax.saxexts.py, line
42) which is why py2exe doesn't pick it up as being necessary.

All of which means it has to be explicitly included in the build. So, I was
able to solve the problem with the following setup.py command line:

python setup.py py2exe --includes xml.sax.drivers2.drv_pyexpat

I've no idea what Martin was referring to when he said RTFM, because I could
find nothing about this. (Then again, perhaps I'm misunderstanding what he
means by RTFM?)


RTFM is tech jargon for "read the f**king manual".
Jul 18 '05 #4
Steven Bell wrote:
I've no idea what Martin was referring to when he said RTFM, because I could
find nothing about this. (Then again, perhaps I'm misunderstanding what he
means by RTFM?)


RTFM is tech jargon for "read the f**king manual".


In the Python world this usually reads as "Read The Felicitous Manual" :-)

--
Marc-Andre Lemburg
eGenix.com

Professional Python Software directly from the Source (#1, Oct 09 2003)
Python/Zope Products & Consulting ... http://www.egenix.com/
mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/

__________________________________________________ ______________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
Jul 18 '05 #5
> [ma****@v.loewis.de (Martin v. Löwis)]
You have to explicitly ask py2exe to include pyexpat in the
executable. RTFM.


*If* you are going to say RTFM you'd better make sure it *is* in the
manual. Otherwise you'd better s-h-a-d-d-u-p.

Next time you feel like saying "RTFM" in comp.lang.python either
(1) say it in comp.lang.java
(2) copy and paste the URL to the manual and point out the Section you
feel they should read.

--
Q: How many Democrats does it take to enjoy a good joke?
A: One more than you can find.
Jul 18 '05 #6
hw***@hotmail.com (Will Stuyvesant) writes:
[ma****@v.loewis.de (Martin v. Löwis)]
You have to explicitly ask py2exe to include pyexpat in the
executable. RTFM.


*If* you are going to say RTFM you'd better make sure it *is* in the
manual. Otherwise you'd better s-h-a-d-d-u-p.


See http://starship.python.net/crew/theller/py2exe/,
in "Flags to include or exclude modules or packages:"

Regards,
Martin
Jul 18 '05 #7

"Martin v. Löwis" <ma****@v.loewis.de> wrote in message
news:m3************@mira.informatik.hu-berlin.de...
hw***@hotmail.com (Will Stuyvesant) writes:
[ma****@v.loewis.de (Martin v. Löwis)]
You have to explicitly ask py2exe to include pyexpat in the
executable. RTFM.


*If* you are going to say RTFM you'd better make sure it *is* in the
manual. Otherwise you'd better s-h-a-d-d-u-p.


See http://starship.python.net/crew/theller/py2exe/,
in "Flags to include or exclude modules or packages:"


But, Martin, there's absolutely no mention of 'expat' in this entire document,
much less that section. So, how on earth was the advice 'RTFM' to help?

In the end, I was able to find an answer by stepping through code with a
debugger to find the module which wasn't being included. THAT
('xml.sax.drivers2.drv_pyexpat') was the unknown. THAT was the information
sort, by the original poster, I'm sure. If it wasn't then they needed a lot
more hand-holding than you're terse abuse.

In any case, I'll see if I can get this added to the pyexe documentation,
because I'd imagine this must be a recurring problem ... surely? Oddly I could
find absolutely nothing on this subject, apart from this lone thread, when I
originally googled around for an answer.

--
Mike
Jul 18 '05 #8

"Steven Bell" wrote:
"Mike Thompson":
"Kathleen Kudzma":
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 happen immediately. It happens as soon as I try to create a classReader object.

Please see the warnings that I get below when I create the .EXE:

>**********
>>warning: py2exe: * The following modules were not found: warning: py2exe: >>* Carbon.Folder warning: py2exe: * Carbon.Folders warning: py2exe: * >>DateTime warning: py2exe: * Ft.Lib warning: py2exe: *
>>Ft.Lib.DumpBgTuple warning: py2exe: * Ft.__init__ warning: py2exe: *
>>SOCKS warning: py2exe: * XPathParserc warning: py2exe: *
>>ext.IsDOMString warning: py2exe: * ext.SplitQName warning: py2exe: *
>>fcntl warning: py2exe: * ic warning: py2exe: * mx.DateTime warning:
>>py2exe: * rourl2path warning: py2exe: * xml.xslt warning: py2exe: *
>>xml.xslt.ParsedPattern warning: py2exe:
>>************************************************ ***************


Yes, I've just had the same problem -- using py3.2 and py2exe v0.4.2

After spending some time in a debugger following the execution path, I found out that the module xml.sax.drivers2.drv_pyexpat is the one that is missing. It gets loaded through a call to __import__ (see _xmlplus.sax.saxexts.py, line 42) which is why py2exe doesn't pick it up as being necessary.

All of which means it has to be explicitly included in the build. So, I was able to solve the problem with the following setup.py command line:

python setup.py py2exe --includes xml.sax.drivers2.drv_pyexpat

I've no idea what Martin was referring to when he said RTFM, because I could find nothing about this. (Then again, perhaps I'm misunderstanding what he
means by RTFM?)


RTFM is tech jargon for "read the f**king manual".

Yes. Except its not in the f**king manual, so I've no idea why Matrin is being
abusive.

--
Mike
Jul 18 '05 #9

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

Similar topics

0
by: RJS | last post by:
Hi all, I can't get a py2exe compiled app to run with numarray (numarray-0.5.win32- py2.2). Also wxPythonWIN32-2.3.3.1-Py22 and ActivePython-2.2.1-222. In the sample below, commenting out...
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:...
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...
2
by: Will | last post by:
Maybe there is another group for posting this... I am a total newbie to Python... so please forgive me if I ask a bunch of inappropriate questions... as I am a big question asker. If I develope...
2
by: David Brownell | last post by:
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...
3
by: anthony hornby | last post by:
Hi, I am starting my honours degree project and part of it is going to be manipulating ASCII encoded XML files from a legacy database and converting them to Unicode and doing text processing stuff...
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...
1
by: shane.external | last post by:
I'm having trouble using Py2exe with a PyQT-based python project. Or possibly I'm having a problem with PyQT and Py2exe makes it apparent. Whichever it is, I run into trouble with importing QtCore...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.