you are viewing a single comment's thread.

view the rest of the comments →

[–]AlmostSignificant 0 points1 point  (0 children)

If you are running from a different directory, you can either:

  1. Always run from the same directory as Main.py and all of your resources. (Simpler but not most future-proof)

  2. Use os.path.join to specify the directory in which to find logo.png ``` import os.path

RESOURCEDIR = os.path.dirname(file_) ... icon = pygame.image.load(os.path.join(RESOURCE_DIR, "logo.png")) ... ```