I am trying to open a window in pygame but keep getting this error:
Traceback (most recent call last):
File "python", line 3, in <module>
pygame.error: video system not initialized
This is my code:
import pygame
pygame.init()
pygame.display.list_modes()
pygame.display.set_mode([700, 500])
black = (0, 0, 0)
red = (255, 0, 0)
white = (255, 255, 255)
If I do not have 'pygame.display.list_modes()' included it has the error:
Traceback (most recent call last):
File "python", line 3, in <module>
pygame.error: No available video device
I have used 'pygame.init()' so do not know what has gone wrong, Can anyone please help me to figure out what has gone wrong? Thanks in advance to anyone who tries to help my out.
I don't think it makes a difference but I am using Repl.it to code this.