pygame.error video system not initialized code example
Example: for e in p.event.get(): pygame.error: video system not initialized
import pygame as p
import sys
p.init()
screen = p.display.set_mode((800, 800))
while True:
for e in p.event.get():
if e.type == p.QUIT:
p.quit()
sys.exit(1)