so I get this error when I try to run my pygame code: pygame.error: video system not initialized
i specify where the wing IDE tells me it is in the code below
I had this issue recently, and I discovered a strange and unusual bug in the code that I'd written -- only after reading it and re-reading it a dozen times over a 10 minute stretch, trying to launch the file (which looked perfect) a dozen times.
There was pygame.init(). There was screen = pygame.display.set_mode((size)) with the variable size in position to be available in the global namespace.
Turns out it was the main game loop.
# main game loop
while RUNNING == True:
for tneve in pygame.event.get():
if tneve.type == QUIT:
print(tneve)
RUNNING = False
loop()
render()
CLOCK.tick(FPS)
cleanup()
# End
What a pain!
P.S.
The problem is the one-stop-too-far indentation of everything below RUNNING = False.