Why does pygame.event.get() give this error?
error: video system not initialized
The code is functional but gives this error after performing the function.
pygame.event.get()
while not pygame.mouse.get_pressed()[0]:
key = pygame.key.get_pressed()
if key[pygame.K_SPACE]:
pygame.quit()
pygame.event.get()
The program quits but gives the above error.
I think you’re missing a call to
pygame.initto initializepygamemodules.For more information, please have a look at the pygame introduction.