This project has moved and is read-only. For the latest updates, please go here.

Unable to get Pygame running.

Jan 15, 2014 at 9:55 PM
Hello, I recently installed PTVS to work with python, but I'm unable to get Pygame to work. Whenever I run my code it comes up with an empty console window that just says "Press any key to continue..."

Can someone please give me some advice to make this work. Thanks for any reply.
Jan 16, 2014 at 12:27 AM
What if you set a breakpoint somewhere in your code; say, at the first line of your startup script?

Also, can you please give more details on your environment (i.e. VS version, Python version and bitness, PyGame version)?
Jan 16, 2014 at 1:01 PM
Hello, I'm current using version 11.0.6 of Visual Studio Professional 2012. I also have Python 2.7 installed along with Pygame 1.9.1.

I also double checked and no breakpoint have been placed. Thanks for the reply.
Jan 16, 2014 at 5:56 PM
I'm not sure I understood that last sentence fully. Do you mean to say that, if you do set a breakpoint, it appears inactive (as a hollow circle rather than a solid one)?

I was basically wondering if you are able to hit breakpoints at all; if you do, then you should be able to set one at start and try stepping through your code to see where and why it terminates prematurely.
Jan 16, 2014 at 6:39 PM
Sorry, I should have posted my actual code, it was incorrect. However now I'm having a different problem.

The error message is, "'c:\python27\lib\site-packages\setuptools-2.0.2-py2.7.egg' is not in list" from the file,

Thanks again for the reply.
Jan 16, 2014 at 6:48 PM
Is it a fatal error, or just a reported exception?

(i.e. if you just press F5 to keep running, does it terminate or do what you expect)
Jan 16, 2014 at 9:02 PM
After around 3 presses of F5 it runs. Each time I press it though it gives the exact same error for the first three, then it runs on the fourth.
Jan 16, 2014 at 9:18 PM
That sounds like an exception incorrectly treated as unhandled when it's handled. It's something for which we had quite a few reports, but still haven't found a way to reproduce it for debugging.

Can you try the most recent PTVS dev build (rather than 2.0 RTM) and see if it still happens for you?
Jan 16, 2014 at 9:23 PM
I took one of the bug reports that was actually submitted as a bug and made it a generic item for this issue:

Let's move the discussion there so that we can keep track of how many people are affected and any workarounds etc are also shared.
Jan 16, 2014 at 9:53 PM
Alright, thanks for all the help so far.