py2exe & pyxml

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kathleen Kudzma

    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:
    [color=blue]
    >**********[color=green]
    >>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:
    >>************* *************** *************** *************** *****[/color][/color]

    _______________ _______________ _______________ _______________ _____
    Try MSN Messenger 6.0 with integrated webcam functionality!



  • Martin v. Löwis

    #2
    Re: py2exe & pyxml

    "Kathleen Kudzma" <kmkstyle@hotma il.com> writes:
    [color=blue]
    > 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.[/color]

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

    Regards,
    Martin

    Comment

    • Mike Thompson

      #3
      Re: py2exe &amp; pyxml


      "Kathleen Kudzma" <kmkstyle@hotma il.com> wrote in message
      news:mailman.10 63713803.30748. python-list@python.org ...[color=blue]
      > 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:
      >[color=green]
      > >**********[color=darkred]
      > >>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:
      > >>************* *************** *************** *************** *****[/color][/color]
      >[/color]

      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



      Comment

      • Steven Bell

        #4
        Re: py2exe &amp; pyxml

        "Mike Thompson" <none by e-mail> wrote in message news:<3f7c18cd$ 0$13656$afc38c8 7@news.optusnet .com.au>...[color=blue]
        > "Kathleen Kudzma" <kmkstyle@hotma il.com> wrote in message
        > news:mailman.10 63713803.30748. python-list@python.org ...[color=green]
        > > 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:
        > >[color=darkred]
        > > >**********
        > > >>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:
        > > >>************* *************** *************** *************** *****[/color]
        > >[/color]
        >
        > 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?)[/color]

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

        Comment

        • M.-A. Lemburg

          #5
          Re: py2exe &amp; pyxml

          Steven Bell wrote:[color=blue][color=green]
          >>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?)[/color]
          >
          > RTFM is tech jargon for "read the f**king manual".[/color]

          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)[color=blue][color=green][color=darkred]
          >>> Python/Zope Products & Consulting ... http://www.egenix.com/
          >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/[/color][/color][/color]
          _______________ _______________ _______________ _______________ ____________

          ::: Try mxODBC.Zope.DA for Windows,Linux,S olaris,FreeBSD for free ! ::::


          Comment

          • Will Stuyvesant

            #6
            Re: py2exe &amp; pyxml

            > [martin@v.loewis .de (Martin v. Löwis)][color=blue]
            > You have to explicitly ask py2exe to include pyexpat in the
            > executable. RTFM.[/color]

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

            Comment

            • Martin v. Löwis

              #7
              Re: py2exe &amp; pyxml

              hwlgw@hotmail.c om (Will Stuyvesant) writes:
              [color=blue][color=green]
              > > [martin@v.loewis .de (Martin v. Löwis)]
              > > You have to explicitly ask py2exe to include pyexpat in the
              > > executable. RTFM.[/color]
              >
              > *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.[/color]

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

              Regards,
              Martin

              Comment

              • Mike Thompson

                #8
                Re: py2exe &amp; pyxml


                "Martin v. Löwis" <martin@v.loewi s.de> wrote in message
                news:m3k77edoyj .fsf@mira.infor matik.hu-berlin.de...[color=blue]
                > hwlgw@hotmail.c om (Will Stuyvesant) writes:
                >[color=green][color=darkred]
                > > > [martin@v.loewis .de (Martin v. Löwis)]
                > > > You have to explicitly ask py2exe to include pyexpat in the
                > > > executable. RTFM.[/color]
                > >
                > > *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.[/color]
                >
                > See http://starship.python.net/crew/theller/py2exe/,
                > in "Flags to include or exclude modules or packages:"
                >[/color]

                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


                Comment

                • Mike Thompson

                  #9
                  Re: py2exe &amp; pyxml


                  "Steven Bell" wrote:[color=blue]
                  > "Mike Thompson":[color=green]
                  > > "Kathleen Kudzma":[color=darkred]
                  > > > 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[/color][/color][/color]
                  the[color=blue][color=green][color=darkred]
                  > > > .EXE; it does not happen if I run the .PY file. When I'm running the[/color][/color][/color]
                  ..EXE[color=blue][color=green][color=darkred]
                  > > > this exception doesn't happen immediately. It happens as soon as I try[/color][/color][/color]
                  to[color=blue][color=green][color=darkred]
                  > > > 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:[/color][/color][/color]
                  py2exe:[color=blue][color=green][color=darkred]
                  > > > >>* Carbon.Folder warning: py2exe: * Carbon.Folders warning: py2exe:[/color][/color][/color]
                  *[color=blue][color=green][color=darkred]
                  > > > >>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:
                  > > > >>************* *************** *************** *************** *****
                  > > >[/color]
                  > >
                  > > 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[/color][/color]
                  found[color=blue][color=green]
                  > > out that the module xml.sax.drivers 2.drv_pyexpat is the one that is[/color][/color]
                  missing.[color=blue][color=green]
                  > > It gets loaded through a call to __import__ (see _xmlplus.sax.sa xexts.py,[/color][/color]
                  line[color=blue][color=green]
                  > > 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[/color][/color]
                  was[color=blue][color=green]
                  > > 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[/color][/color]
                  could[color=blue][color=green]
                  > > find nothing about this. (Then again, perhaps I'm misunderstandin g what he
                  > > means by RTFM?)[/color]
                  >
                  > RTFM is tech jargon for "read the f**king manual".[/color]


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

                  --
                  Mike


                  Comment

                  Working...