Pygame keeps quitting - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Game Development (https://python-forum.io/forum-11.html) +--- Thread: Pygame keeps quitting (/thread-7071.html) |
Pygame keeps quitting - Benjipincus - Dec-20-2017 My pygame keeps quitting unexpectedly, please help Here is my code: import pygame pygame.init() windowSize = [400, 300] screen = pygame.display.set_mode(windowSize) colour = pygame.color.Color('#0A32F4') done = False while not done: pygame.draw.rect(screen, colour, [10, 20, 30, 40]) pygame.display.flip() for event in pygame.event.get(): if event.type == pygame.QUIT: done = True pygame.quit() RE: Pygame keeps quitting - metulburr - Dec-20-2017 what do you mean by unexpectedly? RE: Pygame keeps quitting - Benjipincus - Dec-20-2017 A tab opens up and says "Pygame exit unexpectedly," not sure what to do. Just got pygame to work. Exact message Quote:Click Reopen to open the application again. Click Report to see more detailed information and send a report to Apple. RE: Pygame keeps quitting - Windspar - Dec-20-2017 What version of python and pygame are you using ? import sys, pygame print(pygame.version) print(sys.version)Curious. Try adding a clock or delay. # after pygame.display.flip() pygame.time.delay(10)or clock = pygame.time.Clock() # after pygame.display.flip() clock.tick(30) RE: Pygame keeps quitting - metulburr - Dec-20-2017 i can say ive heard a lot of problems from users of Mac and Pygame. Anything from them having to do things such as downgrading El Captain's version sdl_image from 1.2.12 down to 1.2.10 due to a bug. I dont know what mac version you have as i do not have a mac or keep up with their stuff. But there seems to always be an issue with macs. Now having said that. You could of easily installed the wrong version. If your using the python2.7-32 from the other thread then i would suggest to look for a wheel of pygame for that version here https://pypi.python.org/pypi/Pygame I dont know if those listed for macosx are for 32 bit or 64, but you can try those. If you have installed every possible one for mac than and still not succeed, i would put up an issue at pygame for help from them https://github.com/pygame/pygame/issues You can also search out previously issues with mac by searching out mac issues to see if someone says the same issue https://github.com/pygame/pygame/issues?utf8=%E2%9C%93&q=mac |