473,746 Members | 2,215 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:
"SAXReaderNotAv ailable: 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.DumpBg Tuple warning: py2exe: * Ft.__init__ warning: py2exe: *
SOCKS warning: py2exe: * XPathParserc warning: py2exe: *
ext.IsDOMStri ng 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.Pars edPattern warning: py2exe:
************* *************** *************** *************** *****


_______________ _______________ _______________ _______________ _____
Try MSN Messenger 6.0 with integrated webcam functionality!
http://www.msnmessenger-download.com...g/reach_webcam
Jul 18 '05 #1
8 4737
"Kathleen Kudzma" <km******@hotma il.com> writes:
PROBLEM: When I try to create a classReader object I get an exception:
"SAXReaderNotAv ailable: 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******@hotma il.com> wrote in message
news:ma******** *************** ***********@pyt hon.org...
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:
"SAXReaderNotAv ailable: 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.DumpBg Tuple warning: py2exe: * Ft.__init__ warning: py2exe: *
SOCKS warning: py2exe: * XPathParserc warning: py2exe: *
ext.IsDOMStri ng 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.Pars edPattern 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.drivers 2.drv_pyexpat is the one that is missing.
It gets loaded through a call to __import__ (see _xmlplus.sax.sa xexts.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.drivers 2.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 misunderstandin g 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******@hotma il.com> wrote in message
news:ma******** *************** ***********@pyt hon.org...
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:
"SAXReaderNotAv ailable: 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.DumpBg Tuple warning: py2exe: * Ft.__init__ warning: py2exe: *
>SOCKS warning: py2exe: * XPathParserc warning: py2exe: *
>ext.IsDOMStri ng 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.Pars edPattern 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.drivers 2.drv_pyexpat is the one that is missing.
It gets loaded through a call to __import__ (see _xmlplus.sax.sa xexts.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.drivers 2.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 misunderstandin g 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 misunderstandin g 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,S olaris,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.pytho n 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.c om (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.loewi s.de> wrote in message
news:m3******** ****@mira.infor matik.hu-berlin.de...
hw***@hotmail.c om (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.drive rs2.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:
"SAXReaderNotAv ailable: 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.DumpBg Tuple warning: py2exe: * Ft.__init__ warning: py2exe: *
>>SOCKS warning: py2exe: * XPathParserc warning: py2exe: *
>>ext.IsDOMStri ng 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.Pars edPattern 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.drivers 2.drv_pyexpat is the one that is missing. It gets loaded through a call to __import__ (see _xmlplus.sax.sa xexts.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.drivers 2.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 misunderstandin g 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
2991
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 "import numarray" allows the exe to run. Left in, I get "4.exe has generated errors" etc. I'm going around and around and there isn't much on Google. py2exe output is last.
1
2396
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: py2exe: * pywintypes
12
5221
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): File "<string>", line 51, in Notify File "<string>", line 105, in __init__
2
1702
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 an application in Python and use the Py2exe (hope I have that right) tool... can I embed certain files... like graphic files... and even video files... into the exe... so that they reside there, during execution... as opposed to uncompressing into...
2
2046
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 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
3
1378
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 on the data. I am new to python ( total n00b ) but am keen to use it as the rest of the software my application has to extend is already written in python, plus I've always wanted to learn more about it - so here's my chance :-) I've written...
1
1880
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 <http://www.python.org/doc/2.3.5/lib/module-xml.dom.html>. I don't seem to have PyXML installed on my system, but: >>> import xml.dom.minidom
5
2131
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,
1
3476
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 and QtGui. The error reported is: Traceback (most recent call last): File "xmlEdit.py", line 3, in ? File "PyQt4\QtCore.pyc", line 12, in ? File "PyQt4\QtCore.pyc", line 10, in __load ImportError: DLL load failed: Invalid access to memory...
0
8970
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8795
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9486
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9346
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9279
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9214
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8219
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6763
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6057
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...

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.