He usado Pygame con python 2.7 antes, pero recientemente me 'actualicé' a Python 3.2. Descargué e instalé la versión más nueva de Pygame que se dice que funciona con esta versión de python. Sin embargo, tuve este error bastante frustrante sobre lo que debería ser un simple bloque de código. El código es:Error de Pygame: sistema de video no inicializado
import pygame, random
title = "Hello!"
width = 640
height = 400
pygame.init()
screen = pygame.display.set_mode((width, height))
running = True
clock = pygame.time.Clock()
pygame.display.set_caption(title)
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.quit():
running = False
else:
print(event.type)
clock.tick(240)
pygame.quit()
Y cada vez lo ejecuto me sale:
17
1
4
Traceback (most recent call last):
File "C:/Users/David/Desktop/hjdfhksdf.py", line 15, in <module>
for event in pygame.event.get():
pygame.error: video system not initialized
¿Por qué recibo este error?