I'm working on a game with pygame and I have the following directory for it:
As you can see, I have an images folder in the package.
Now I'm struggling, to get the image with the path "JumpnRun/images/player/jumper-1.png" from within the path "JumpnRun/Player/Player.py".
I tried to get that image using the following code:
self.image:pygame.Surface = pygame.image.load(str(Path("..") / "images" / "player" / "jumper-1.png")).convert_alpha()
But this doesn't seem to work and I get the error "FileNotFoundError: No such file or directory."
Any ideas on that?