Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Visual studio pygame.error: video system not initialized

+5 votes
asked Jan 25 by Jere (170 points)

Here is my code to test pygame after installation:

import pygame

pygame.init()

screen = pygame.display.set_mode((400300))

done = False

while not done:

    for event in pygame.event.get():

        if event.type == pygame.QUIT:

            done = True

pygame.quit()

Here is the error:

Traceback (most recent call last):
  File "a:\Visual studio stuff.....", line 18, in <module>
    main()
  File "a:\Visual studio stuff......", line 11, in main
    for event in pygame.event.get():
                 ^^^^^^^^^^^^^^^^^^
pygame.error: video system not initialized

Ive tried to look everywhere and nothing seems to work...

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...