#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    1
    Rep Power
    0

    py2exe then a problem


    I only started to learn python yesterday.

    I tried to compile my script into an executable via py2exe and it worked. When I try to execute it though this is what happens:

    C:\Python23\dist>hello
    Could not locate script resource:

    (so i try again)

    C:\Python23\dist>hello.exe
    Could not locate script resource:

    All the files that came along with the compilation are also in the dist folder.


    ANy help? TY
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    Add one to the list of strange py2exe errors . Anyway what exactly did you do to compile the files. also mayvbe you could attach your program and setup file..

    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    1
    Rep Power
    0

    May this helps...


    Recheck the output of py2exe for a traceback ...

    I had the same error with an 'old' *.exe file my 'bin' directory (an older version of the script I copyied to the folder I store my python exes).

    Seems it can be that some part of your exe file doesn't match the libraries (datetime.pyd, library.zip, python23.dll,wxpopen.exe, _sre.pyd etc.) you have copied/which are created by py2exe.

    Make sure you really have a new .exe after calling py2exe.

    Recall your 'setup.py py2exe' combo until you get NO TRACEBACK !

    BTW: Please note also that py2exe has changed:

    an older version had the key/value "script=['cconv.py']", the newest (from about 2 weeks before) had now "console=['cconv.py']" for a console application ...

    sample "setup.py" from my sources:

    from distutils.core import setup
    import py2exe

    setup(name='cconv /eol 2003',
    description="wrapper for charconv.exe ",
    console=['cconv.py'])

    HTH ,

    =(eol.ruin)=
    Last edited by eolruin; February 21st, 2004 at 09:10 AM.
  6. #4
  7. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    14
    Python and py2exe in one day, that's a lot to learn in short time.
    Make sure you are using the latest versions of Python (2.3.3) and Py2exe (0.5.0). Then read the other threads here (search this forum for py2exe) and read the py2exe website and it's wiki. It's a good chance that other documentation and examples on using py2exe are out of date.

    Does anyone know of a new tutorial? Could be an opportunity for someone
    Grim

IMN logo majestic logo threadwatch logo seochat tools logo