using python 36,
atom 1.13 text editor
First time asking a question here on stack overflow.
For some reason when loading up an image (in the same folder as the .py file) like so:
background_image = pygame.image.load('my background.png').convert()
pygame.error: Couldn't open my background.png
Your problem is that atom-runner uses the Atom project path as the working directory when running a program. Your program is assuming the working directory is same as the folder the image is in. You need to either set up an Atom project with that as the root folder, or use 'os.path' to set the proper path to the image, like so:
from os import path working_dir = path.dirname(__file__) background_image = pygame.image.load(path.join(working_dir, 'my background.png')).convert()