0

I made a small game in python 2.7 using Pygame. I wanted to make the game playable for my friends, so I used cx_freeze to create an .exe version.

So I did this, and was able to run the game, but an error resulting in the program crashing at, as far as I could tell, random times.

Here's the error message I got:

File "C:\python27\lib\site-packages\cx_Freeze\initscripts\Console.py",
line 27, in <module>
File "projectV5.py", line 127, in <module>
IOError: [Errno 9] Bad file descriptor

Please bear in mind that I'm pretty new to python, and programming in general.

  • 1
    What's at (and around) `projectV5.py` line 127? – Joachim Isaksson Oct 09 '13 at 19:52
  • Initially it was a print-statement that no longer served a purpose. I think it was "print musikktime". Anyway, I removed the line, and the error still said the exact same thing; line 127. – user2864230 Oct 09 '13 at 19:58
  • Well, I'm ashamed to say that I actually edited out that line in a copy of that file... It seems to have fixed the problem. Why did that simple print-statement cause problems, though? – user2864230 Oct 09 '13 at 20:17
  • If you freeze with the win32gui base, it has no standard output stream, so there's nowhere for it to print to. There are ways to work round that, but if it's just one print statement, taking it out is easiest. – Thomas K Oct 09 '13 at 23:02

0 Answers0