Go Back   Computer Forums > General Computing > Programming
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 04-11-2013, 12:44 PM   #1
Beta Member
Join Date: Mar 2013
Posts: 4
Default Python Py2exe conversion problem.

I am relatively new to programming, and this is my first attempt at converting a Python script to a Windows executable. Going off of what I've seen on the internet, Py2exe seems to be the easiest way to do it. I have run a general setup.py script I found on the internet (the only one I can get to work) multiple times. I have run it through IDLE and command prompt, multiple times each, all with the same results. It successfully makes an "Application" file with the correct file name (Troops vs Troops2), but when I try to run it, it tells me that there was an error and it creates a log for me to see what the problem is. This is what it always says:

Traceback (most recent call last):
File "Troops vs Troops2.py", line 87, in ?
File "Troops vs Troops2.py", line 11, in main
EOFError: EOF when reading a line

I've looked through the code and I can't seem to find any errors. Line 87 is actually just the "main()" function so I'm very confused as to the problem. Also, the program runs flawlessly in IDLE, so the problem is out of my range of knowledge. Obviously I have no knowledge about how py2exe works so if you have to tweak the script you want to convert to get it to work, please help me out.

I was wondering if the problem was with the python file I was trying to convert or something with my system, the py2exe script, etc, so I have tried to use the same setup.py script with multiple, simple programs. These small programs like the Hello World program, etc., all create "Application" files also, but when I attempt to run them, they don't produce an error, a log, or anything. They just don't open. Nothing happens.

Here are Pastebin links to the setup.py conversion script I'm using and the program I'm trying to convert, respectively. [Python] setup.py - Pastebin.com
[Python] Troops vs Troops2.py - Pastebin.com

Like I said, I'm relatively new so please use terms I can understand. If I can't convert it using this script, or something like that, please tell me how I can. I really would like to get this to an ".exe" file. Thanks
swinefire is offline   Reply With Quote

programming, py2exe, python

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 06:46 PM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0