Problem with py2exe and installer5b5_5

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

    Problem with py2exe and installer5b5_5

    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.p yc", line 287, in OnButton1Button
    File "EIM_xml.py c", line 135, in main_xml
    File "EIM_xml.py c", line 44, in construction_li ste_xml
    File "xml\sax\__init __.pyc", line 33, in parse
    File "xml\sax\expatr eader.pyc", line 86, in parse
    File "xml\sax\saxuti ls.pyc", line 250, in prepare_input_s ource
    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
  • Eric Brunel

    #2
    Re: Problem with py2exe and installer5b5_5

    hellprout wrote:[color=blue]
    > 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.p yc", line 287, in OnButton1Button
    > File "EIM_xml.py c", line 135, in main_xml
    > File "EIM_xml.py c", line 44, in construction_li ste_xml
    > File "xml\sax\__init __.pyc", line 33, in parse
    > File "xml\sax\expatr eader.pyc", line 86, in parse
    > File "xml\sax\saxuti ls.pyc", line 250, in prepare_input_s ource
    > File "ntpath.pyc ", line 274, in isfile
    > LookupError: no codec search functions registered: can't find encoding[/color]

    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 <eric.brunel@pr agmadev.com> -
    PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com

    Comment

    • Andrew McLean

      #3
      Re: Problem with py2exe and installer5b5_5

      In article <bi4j1e$grv$1@n ews-reader3.wanadoo .fr>, Eric Brunel
      <eric.brunel@pr agmadev.com> writes[color=blue]
      >hellprout wrote:[color=green]
      >> 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.p yc", line 287, in OnButton1Button
      >> File "EIM_xml.py c", line 135, in main_xml
      >> File "EIM_xml.py c", line 44, in construction_li ste_xml
      >> File "xml\sax\__init __.pyc", line 33, in parse
      >> File "xml\sax\expatr eader.pyc", line 86, in parse
      >> File "xml\sax\saxuti ls.pyc", line 250, in prepare_input_s ource
      >> File "ntpath.pyc ", line 274, in isfile
      >> LookupError: no codec search functions registered: can't find encoding[/color]
      >
      >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).[/color]

      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

      Comment

      Working...