py2exe & pyxml

Discussion in 'Python' started by Kathleen Kudzma, Sep 16, 2003.

  1. 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/tracking/reach_webcam
    Kathleen Kudzma, Sep 16, 2003
    #1
    1. Advertising

  2. "Kathleen Kudzma" <> 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
    Martin v. =?iso-8859-15?q?L=F6wis?=, Sep 16, 2003
    #2
    1. Advertising

  3. "Kathleen Kudzma" <> wrote in message
    news:...
    > 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
    Mike Thompson, Oct 2, 2003
    #3
  4. Kathleen Kudzma

    Steven Bell Guest

    "Mike Thompson" <none by e-mail> wrote in message news:<3f7c18cd$0$13656$>...
    > "Kathleen Kudzma" <> wrote in message
    > news:...
    > > 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".
    Steven Bell, Oct 9, 2003
    #4
  5. 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 ! ::::
    M.-A. Lemburg, Oct 9, 2003
    #5
  6. > [ (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.
    Will Stuyvesant, Oct 9, 2003
    #6
  7. (Will Stuyvesant) writes:

    > > [ (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
    Martin v. =?iso-8859-15?q?L=F6wis?=, Oct 9, 2003
    #7
  8. "Martin v. Löwis" <> wrote in message
    news:-berlin.de...
    > (Will Stuyvesant) writes:
    >
    > > > [ (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
    Mike Thompson, Oct 15, 2003
    #8
  9. "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
    Mike Thompson, Oct 15, 2003
    #9
  10. "Mike Thompson" <none by e-mail> writes:

    > > > > [ (Martin v. Löwis)]
    > > > > You have to explicitly ask py2exe to include pyexpat in the
    > > > > executable. RTFM.

    [...]

    > 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?


    Reading alone is not enough - you also have to understand what you
    read.

    I say "You have to explicitly ask py2exe to include pyexpat in the
    executable", and the documentation says

    "Flags to include or exclude modules or packages:

    --includes or -i list
    comma separated list of modules to include.
    Note that includes overrides excludes
    "

    You have to combine these, and come up with a strategy of including
    pyexpat.

    I did not say that the documentation says that you have to include
    pyexpat. However, in reading the documentation, you should learn *how*
    you include pyexpat.

    > 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.


    Ok, that may be the case - so you would have to include
    xml.sax.drivers2.drv_pyexpat as well.

    Regards,
    Martin
    Martin v. =?iso-8859-15?q?L=F6wis?=, Oct 16, 2003
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. F. GEIGER
    Replies:
    0
    Views:
    900
    F. GEIGER
    Aug 16, 2004
  2. David Brownell

    py2exe, PyXML, and utf-16-be Error

    David Brownell, Aug 23, 2004, in forum: Python
    Replies:
    2
    Views:
    441
    David Brownell
    Aug 24, 2004
  3. python
    Replies:
    3
    Views:
    1,753
    Simon Brunning
    May 22, 2006
  4. Chris Spencer

    Re: [Py2exe-users] py2exe 0.6.9 released

    Chris Spencer, Nov 17, 2008, in forum: Python
    Replies:
    3
    Views:
    555
    Pascal
    Dec 8, 2008
  5. Mark Hammond

    RE: [Py2exe-users] py2exe 0.6.9 released

    Mark Hammond, Nov 17, 2008, in forum: Python
    Replies:
    0
    Views:
    445
    Mark Hammond
    Nov 17, 2008
Loading...

Share This Page