Unable to open an image


catImg = pygame.image.load(“cat.png”)
DISPLAYSURF.blit(catImg, (catx, caty))

The above code is written in Python/Pygame.

It runs successfully in Thonny, but gets the following error in Atom “pygame.error: Couldn’t open cat.png”


What happens if you enter the absolute file path of cat.png?

Since Atom can’t run Python code, you must be using a package. You should identify that package when asking for help.