Loading a file is in relation to the file that you ran to run the code.
I am assuming it is this based on your path?
If that fails i would give the fullpath. This is not the fullpath if you are on Windows. I am also assuming that based on seeing AppData directory.
It should be
I am assuming it is this based on your path?
pygame.image.load("First Pygame\cannon.png")But that is assuming that your main file you run is in the directory "First Pygame" directory
If that fails i would give the fullpath. This is not the fullpath if you are on Windows. I am also assuming that based on seeing AppData directory.
Quote:pygame.image.load("\Users\ZULU\AppData\Local\Programs\Python\Python37-32\Zion_Python Games\First Pygame\cannon.png")
It should be
pygame.image.load("C:\Users\ZULU\AppData\Local\Programs\Python\Python37-32\Zion_Python Games\First Pygame\cannon.png")
Recommended Tutorials: