I am trying to test an image as a background using pygame. I have been trying to fix this issue for a few days, and now have resolved to StackOverflow
The line I have written to load the image:
back_ground = pygame.image.load(os.chdir(r"C:\Users\zayaa\Desktop\GameSprites\L9.png"))
I have used a directory but I get "NotADirectoryError [WinError 267]"
I have already attempted the following:
back_ground = pygame.image.load(os.chdir(r"C:\\Users\\zayaa\\Desktop\\GameSprites\\L9.png"))
back_ground = pygame.image.load("C:/Users/zayaa/Desktop/GameSprites/L9.png")
back_ground = pygame.image.load("C://Users//zayaa//Desktop//GameSprites//L9.png")
Can someone please tell me how to fix this?
Thank you,
OP