I'm using a website called "Repl.it" to code, and I recently found out that they have Pygame pre-installed. I tried using it, and when I tried to open a screen, I got this error:
Traceback (most recent call last):
File "python", line 3, in <module>
pygame.error: No available video device
Here's the code:
import pygame
pygame.init()
screen = pygame.display.set_mode((400,200))
screen.init()
I have very little coding experience so I have no idea how to fix this. Please help!
Although PyGame is a standard Python library, Replit provides it installed as a separate language. Create a new repl and select PyGame from the language dropdown.
Pygame. error video system not initialized can be fixed by stopping the main loop of implementation with the exit() function. The pygame. init() error is caused by its function not being called and can be solved with the import and initialization of pygame modules.
Repl.it does not support pygame windows. Sadly i can't think of any options for running pygame windows online, i think you have to run them locally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With