Ask coding questions

← Back to all posts
Pygame error please help me fix it


  • Operating system: Linux
  • Python version: 3.8.8
  • SDL version: 2.0.14
  • PyGame version: 2.0.1

Current behavior:

When the code is run , the background color or any of the things that I created show up. There was no errors output onto the console.

Expected behavior:

The color and the objects to actually show up. The background only comes as black, which is not the color that I put.


look below to try it out for yourself.

Coder100 (17038)

yeah if you looked at the errors you can see clearly that replit got itself into trouble:

it's so common, and they haven't been able to fix it yet, but apparently forking it works sometimes.


@Coder100 oh i thought that was a pygame error, it used to work before though...

Coder100 (17038)

really unfortunate how it got broken @snekattack


@snekattack i just realized that i forgot to put a line of code in lol

220208 (6)

Me and @Rishan001 are having a similar problem which we do not know how to fix...

Rishan001 (43)

@220208 We were having issues with the sound output, it seems the REPL version of Pygame is buggy...

OldWizard209 (1101)

@220208 @Rishan001 @snekattack , I think try doing this in a Pygame Repl rather than a normal repl...:

If that doesn't work and your code is correct, then replit is having a few problems, report it here:


i am doing it in a pygame repl @OldWizard209

OldWizard209 (1101)

then it must be a problem from replit @snekattack