Problem with py2exe and installer5b5_5

Discussion in 'Python' started by hellprout, Aug 22, 2003.

  1. hellprout

    hellprout Guest

    hi ,
    i want to use py2exe or installer5b5_5 with my python source

    so no problem when i execute the source , but when i use installer or
    py2exe to create an exe file on windows , i have some problems
    when my program want to read a xml file i have an error

    2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)]
    Traceback (most recent call last):
    File "wxFrame1.pyc", line 287, in OnButton1Button
    File "EIM_xml.pyc", line 135, in main_xml
    File "EIM_xml.pyc", line 44, in construction_liste_xml
    File "xml\sax\__init__.pyc", line 33, in parse
    File "xml\sax\expatreader.pyc", line 86, in parse
    File "xml\sax\saxutils.pyc", line 250, in prepare_input_source
    File "ntpath.pyc", line 274, in isfile
    LookupError: no codec search functions registered: can't find encoding

    i don't know what is it , but i surch something and i did't find the
    solution
    if something have an idea , thanks a lot

    charles
    hellprout, Aug 22, 2003
    #1
    1. Advertising

  2. hellprout

    Eric Brunel Guest

    hellprout wrote:
    > hi ,
    > i want to use py2exe or installer5b5_5 with my python source
    >
    > so no problem when i execute the source , but when i use installer or
    > py2exe to create an exe file on windows , i have some problems
    > when my program want to read a xml file i have an error
    >
    > 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)]
    > Traceback (most recent call last):
    > File "wxFrame1.pyc", line 287, in OnButton1Button
    > File "EIM_xml.pyc", line 135, in main_xml
    > File "EIM_xml.pyc", line 44, in construction_liste_xml
    > File "xml\sax\__init__.pyc", line 33, in parse
    > File "xml\sax\expatreader.pyc", line 86, in parse
    > File "xml\sax\saxutils.pyc", line 250, in prepare_input_source
    > File "ntpath.pyc", line 274, in isfile
    > LookupError: no codec search functions registered: can't find encoding


    Apparently, there is some weird code importing the codecs that py2exe or
    McMillan installer cannot correctly figure out. I had the same problem some time
    ago, which I solved by simply importing explicitely the codecs module via an:

    import codecs

    somewhere in the code. This seems to fix up things for McM's installer (never
    used py2exe).

    HTH
    --
    - Eric Brunel <> -
    PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com
    Eric Brunel, Aug 22, 2003
    #2
    1. Advertising

  3. In article <bi4j1e$grv$>, Eric Brunel
    <> writes
    >hellprout wrote:
    >> hi , i want to use py2exe or installer5b5_5 with my python source
    >>so no problem when i execute the source , but when i use installer or
    >> py2exe to create an exe file on windows , i have some problems
    >> when my program want to read a xml file i have an error 2.2.3 (#42,
    >>May 30 2003, 18:12:08) [MSC 32 bit (Intel)]
    >> Traceback (most recent call last):
    >> File "wxFrame1.pyc", line 287, in OnButton1Button
    >> File "EIM_xml.pyc", line 135, in main_xml
    >> File "EIM_xml.pyc", line 44, in construction_liste_xml
    >> File "xml\sax\__init__.pyc", line 33, in parse
    >> File "xml\sax\expatreader.pyc", line 86, in parse
    >> File "xml\sax\saxutils.pyc", line 250, in prepare_input_source
    >> File "ntpath.pyc", line 274, in isfile
    >> LookupError: no codec search functions registered: can't find encoding

    >
    >Apparently, there is some weird code importing the codecs that py2exe
    >or McMillan installer cannot correctly figure out. I had the same
    >problem some time ago, which I solved by simply importing explicitely
    >the codecs module via an:
    >
    >import codecs
    >
    >somewhere in the code. This seems to fix up things for McM's installer
    >(never used py2exe).


    I had a similar problem with the McMillan installer. This wasn't solved
    by adding:

    import codecs

    but it was solved by adding

    import encodings

    --
    Andrew McLean
    Andrew McLean, Aug 22, 2003
    #3
    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. hellprout
    Replies:
    0
    Views:
    226
    hellprout
    Nov 4, 2003
  2. F. GEIGER
    Replies:
    0
    Views:
    893
    F. GEIGER
    Aug 16, 2004
  3. python
    Replies:
    3
    Views:
    1,744
    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:
    552
    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:
    441
    Mark Hammond
    Nov 17, 2008
Loading...

Share This Page